@@ -43,27 +43,23 @@ if [ "$SSL" != 'yes' ]; then
exit $E_NOTEXIST
fi
+# Update mail templates
+$BIN/v-update-mail-templates
+
# Check if proxy is active
if [ ! -z "$PROXY_SYSTEM" ] || [ ! -z "$PROXY" ]; then
- if ! grep --quiet "forcessl" $HESTIA/data/templates/mail/nginx/default.tpl; then
- $BIN/v-update-mail-templates
- fi
forcessl="/home/$user/conf/mail/$domain/$PROXY_SYSTEM.forcessl.conf"
else
forcessl="/home/$user/conf/mail/$domain/$WEB_SYSTEM.forcessl.conf"
# Insert redirect commands
-if [ ! -z $PROXY ]; then
+if [ ! -z "$PROXY_SYSTEM" ]; then
echo 'return 301 https://$server_name$request_uri;' > $forcessl
- ln -s $forcessl /etc/$PROXY_SYSTEM/conf.d/domains/$WEBMAIL_ALIAS.$domain.forcessl.conf
echo 'RewriteEngine On' > $forcessl
echo 'RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]' >> $forcessl
- ln -s $forcessl /etc/$WEB_SYSTEM/conf.d/domains/$WEBMAIL_ALIAS.$domain.forcessl.conf
#----------------------------------------------------------#
@@ -7,7 +7,7 @@ server {
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
- include %home%/%user%/conf/web/%domain%/forcessl.nginx.conf*;
+ include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
location / {
@@ -12,7 +12,7 @@
SSLCertificateFile %home%/%user%/conf/mail/%root_domain%/ssl/%root_domain%.crt
SSLCertificateKeyFile %home%/%user%/conf/mail/%root_domain%/ssl/%root_domain%.key
- IncludeOptional %home%/%user%/conf/web/%root_domain%/apache2.forcessl.conf*
+ IncludeOptional %home%/%user%/conf/mail/%root_domain%/apache2.forcessl.conf*
<Directory "/usr/share/tinymce/www/">
Options Indexes MultiViews FollowSymLinks
@@ -30,7 +30,7 @@
allow from all
</Directory>
- <Directory /usr/share/z-push>
+ <Directory /usr/share/z-push/>
# Don't list a directory index, follow symlinks (maybe state dir is somewhere linked)
DirectoryIndex index.php
Options -Indexes +FollowSymLinks
@@ -52,6 +52,6 @@ server {
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
- include %home%/%user%/conf/mail/%root_domain%/nginx.ssl.conf_*;
+ include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.ssl.conf_*;
}
@@ -2,7 +2,8 @@ server {
listen %ip%:%proxy_port%;
server_name %domain% %alias%;
- include %home%/%user%/conf/mail/%domain%/nginx.forcessl.conf*;
+ include %home%/%user%/conf/mail/%root_domain%/nginx.forcessl.conf*;
proxy_pass http://%ip%:%web_port%;
location ~* ^.+\.(jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm)$ {
@@ -38,5 +39,5 @@ server {
- include %home%/%user%/conf/mail/%root_domain%/nginx.conf_*;
+ include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;
@@ -2,7 +2,7 @@ server {
server_name %domain_idn% %alias_idn%;
try_files $uri $uri/ /index.php?page=$request_uri;
try_files $uri $uri/ /index.php;
rewrite "^/page/([0-9]+)(/?)$" /index.php?cstart=$1 last;
index doku.php;
location = /favicon.ico {
log_not_found off;
try_files $uri $uri/ /index.php?$args;
try_files $uri $uri/ /index.php?$query_string;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
@@ -13,7 +13,7 @@ server {
# PHP entry point for setup application
location ~* ^/setup($|/) {
# if you need to rewrite www to non-www uncomment bellow
# if ($host != '%domain%' ) {
# rewrite ^/(.*)$ http://%domain%/$1 permanent;
rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
types {
text/html html htm shtml php php5;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
try_files $uri $uri/ @opencart;
try_files /favicon.ico =204;
location /installer {
try_files $uri $uri/ /installer/index.php?$query_string;
access_log off;