diff --git a/bin/v-add-backup-host b/bin/v-add-backup-host index 0d0b70046..5dc489ea9 100755 --- a/bin/v-add-backup-host +++ b/bin/v-add-backup-host @@ -137,8 +137,10 @@ if [ "$type" = 'sftp' ]; then if [ -z $port ]; then port=22 fi - sftmpdir="$path/vst.bK76A9SUkt" - sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1 + if sftpc "mkdir $path" > /dev/null 2>&1 ; then + sftmpdir="$path/vst.bK76A9SUkt" + sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1 + fi rc=$? if [[ "$rc" != 0 ]]; then case $rc in diff --git a/bin/v-backup-user b/bin/v-backup-user index 88db71d16..68682e428 100755 --- a/bin/v-backup-user +++ b/bin/v-backup-user @@ -434,7 +434,7 @@ if [ "$USER" != '*' ]; then set -f i=0 - for udir in $(ls -a |egrep -v "conf|web|dns|mail|^\.\.$|^\.$"); do + for udir in $(ls -a |egrep -v "^conf$|^web$|^dns$|^mail$|^\.\.$|^\.$"); do exclusion=$(echo "$USER" |tr ',' '\n' |grep "^$udir$") if [ -z "$exclusion" ]; then ((i ++)) diff --git a/bin/v-check-user-password b/bin/v-check-user-password index 73a44be62..0c065feb8 100755 --- a/bin/v-check-user-password +++ b/bin/v-check-user-password @@ -49,13 +49,24 @@ fi #----------------------------------------------------------# # Parsing user's salt -shadow=$(grep "^$user:" /etc/shadow) -salt=$(echo "$shadow" |cut -f 3 -d \$) -method=$(echo "$shadow" |cut -f 2 -d \$) -if [ "$method" -eq '1' ]; then - method='md5' +shadow=$(grep "^$user:" /etc/shadow | cut -f 2 -d :) + +if echo "$shadow" | grep -qE '^\$[0-9a-z]+\$[^\$]+\$' +then + salt=$(echo "$shadow" |cut -f 3 -d \$) + method=$(echo "$shadow" |cut -f 2 -d \$) + if [ "$method" -eq '1' ]; then + method='md5' + elif [ "$method" -eq '6' ]; then + method='sha-512' + else + echo "Error: password missmatch" + echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log + exit 9 + fi else - method='sha-512' + salt=${shadow:0:2} + method='des' fi if [ -z "$salt" ]; then @@ -64,7 +75,7 @@ if [ -z "$salt" ]; then exit 9 fi -# Generating SHA-512 +# Generating hash hash=$($BIN/v-generate-password-hash $method $salt <<< $password) if [[ -z "$hash" ]]; then echo "Error: password missmatch" diff --git a/bin/v-generate-password-hash b/bin/v-generate-password-hash index fd917ad38..78a551fe0 100755 --- a/bin/v-generate-password-hash +++ b/bin/v-generate-password-hash @@ -37,5 +37,10 @@ if ($crypt == 'htpasswd' ) { $hash = crypt($password, base64_encode($password)); } +// Generating DES hash +if ($crypt == 'des' ) { + $hash = crypt($password, $salt); +} + // Printing result echo $hash . "\n"; diff --git a/bin/v-list-sys-vesta-autoupdate b/bin/v-list-sys-vesta-autoupdate index 0177cf1f0..f94570180 100755 --- a/bin/v-list-sys-vesta-autoupdate +++ b/bin/v-list-sys-vesta-autoupdate @@ -1,6 +1,6 @@ #!/bin/bash # info: list vesta autoupdate settings -# options: NONE +# options: [FORMAT] # # The function for obtaining autoupdate setings. diff --git a/bin/v-update-firewall b/bin/v-update-firewall index 04a15a5fe..7babd84d5 100755 --- a/bin/v-update-firewall +++ b/bin/v-update-firewall @@ -64,6 +64,19 @@ tmp=$(mktemp) echo "$iptables -P INPUT ACCEPT" >> $tmp echo "$iptables -F INPUT" >> $tmp +# Enabling stateful support +if [ "$conntrack" != 'no' ]; then + str="$iptables -A INPUT -m state" + str="$str --state ESTABLISHED,RELATED -j ACCEPT" + echo "$str" >> $tmp +fi + +# Handling local traffic +for ip in $(ls $VESTA/data/ips); do + echo "$iptables -A INPUT -s $ip -j ACCEPT" >> $tmp +done +echo "$iptables -A INPUT -s 127.0.0.1 -j ACCEPT" >> $tmp + # Pasring iptables rules IFS=$'\n' for line in $(sort -r -n -k 2 -t \' $rules); do @@ -100,25 +113,6 @@ for line in $(sort -r -n -k 2 -t \' $rules); do fi done -# Handling local traffic -for ip in $(ls $VESTA/data/ips); do - echo "$iptables -A INPUT -s $ip -j ACCEPT" >> $tmp -done -echo "$iptables -A INPUT -s 127.0.0.1 -j ACCEPT" >> $tmp -IFS=$'\n' -for p_rule in $(cat $ports); do - eval $p_rule - rule="$iptables -A INPUT -p $PROTOCOL" - echo "$rule --sport $PORT -j ACCEPT" >> $tmp -done - -# Enabling stateful support -if [ "$conntrack" != 'no' ]; then - str="$iptables -A INPUT -p tcp -m state" - str="$str --state ESTABLISHED,RELATED -j ACCEPT" - echo "$str" >> $tmp -fi - # Switching chain policy to DROP echo "$iptables -P INPUT DROP" >> $tmp diff --git a/install/debian/7/exim/exim4.conf.template b/install/debian/7/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/debian/7/exim/exim4.conf.template +++ b/install/debian/7/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/debian/7/templates/web/nginx/php5-fpm/modx.stpl b/install/debian/7/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/modx.tpl b/install/debian/7/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/7/templates/web/php5-fpm/no-php.tpl b/install/debian/7/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/debian/7/templates/web/php5-fpm/no-php.tpl +++ b/install/debian/7/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/debian/8/exim/exim4.conf.template b/install/debian/8/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/debian/8/exim/exim4.conf.template +++ b/install/debian/8/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/debian/8/templates/web/nginx/php5-fpm/modx.stpl b/install/debian/8/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/modx.tpl b/install/debian/8/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/8/templates/web/php5-fpm/no-php.tpl b/install/debian/8/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/debian/8/templates/web/php5-fpm/no-php.tpl +++ b/install/debian/8/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/rhel/5/exim/exim.conf b/install/rhel/5/exim/exim.conf index 0f9830168..6f9a73881 100644 --- a/install/rhel/5/exim/exim.conf +++ b/install/rhel/5/exim/exim.conf @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/rhel/5/templates/web/nginx/php-fpm/modx.stpl b/install/rhel/5/templates/web/nginx/php-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/modx.tpl b/install/rhel/5/templates/web/nginx/php-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/5/templates/web/php-fpm/no-php.tpl b/install/rhel/5/templates/web/php-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/rhel/5/templates/web/php-fpm/no-php.tpl +++ b/install/rhel/5/templates/web/php-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/rhel/6/exim/exim.conf b/install/rhel/6/exim/exim.conf index 0f9830168..6f9a73881 100644 --- a/install/rhel/6/exim/exim.conf +++ b/install/rhel/6/exim/exim.conf @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/rhel/6/templates/web/nginx/php-fpm/modx.stpl b/install/rhel/6/templates/web/nginx/php-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/modx.tpl b/install/rhel/6/templates/web/nginx/php-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/6/templates/web/php-fpm/no-php.tpl b/install/rhel/6/templates/web/php-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/rhel/6/templates/web/php-fpm/no-php.tpl +++ b/install/rhel/6/templates/web/php-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/rhel/7/exim/exim.conf b/install/rhel/7/exim/exim.conf index 0f9830168..6f9a73881 100644 --- a/install/rhel/7/exim/exim.conf +++ b/install/rhel/7/exim/exim.conf @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/rhel/7/templates/web/nginx/php-fpm/modx.stpl b/install/rhel/7/templates/web/nginx/php-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/modx.tpl b/install/rhel/7/templates/web/nginx/php-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/php-fpm/no-php.tpl b/install/rhel/7/templates/web/php-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/rhel/7/templates/web/php-fpm/no-php.tpl +++ b/install/rhel/7/templates/web/php-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/12.04/exim/exim4.conf.template b/install/ubuntu/12.04/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/ubuntu/12.04/exim/exim4.conf.template +++ b/install/ubuntu/12.04/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/modx.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/modx.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/12.10/exim/exim4.conf.template b/install/ubuntu/12.10/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/ubuntu/12.10/exim/exim4.conf.template +++ b/install/ubuntu/12.10/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/modx.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/modx.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/13.04/exim/exim4.conf.template b/install/ubuntu/13.04/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/ubuntu/13.04/exim/exim4.conf.template +++ b/install/ubuntu/13.04/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/modx.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/modx.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/13.10/exim/exim4.conf.template b/install/ubuntu/13.10/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/ubuntu/13.10/exim/exim4.conf.template +++ b/install/ubuntu/13.10/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/modx.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/modx.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/14.04/exim/exim4.conf.template b/install/ubuntu/14.04/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/ubuntu/14.04/exim/exim4.conf.template +++ b/install/ubuntu/14.04/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/modx.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/modx.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/14.10/exim/exim4.conf.template b/install/ubuntu/14.10/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/ubuntu/14.10/exim/exim4.conf.template +++ b/install/ubuntu/14.10/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/modx.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/modx.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/15.04/exim/exim4.conf.template b/install/ubuntu/15.04/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/ubuntu/15.04/exim/exim4.conf.template +++ b/install/ubuntu/15.04/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/modx.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..a56fe12b4 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/modx.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/15.10/exim/exim4.conf.template b/install/ubuntu/15.10/exim/exim4.conf.template index 742f0409e..10359a151 100644 --- a/install/ubuntu/15.10/exim/exim4.conf.template +++ b/install/ubuntu/15.10/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/modx.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/modx.stpl new file mode 100644 index 000000000..b8dfc44d2 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/modx.stpl @@ -0,0 +1,64 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ https://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/modx.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/modx.tpl new file mode 100644 index 000000000..5928cd0ed --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/modx.tpl @@ -0,0 +1,60 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; +# if you need to rewrite www to non-www uncomment bellow +# if ($host != '%domain%' ) { +# rewrite ^/(.*)$ http://%domain%/$1 permanent; +# } + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location / { + try_files $uri $uri/ @rewrite; + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + } + location @rewrite { + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include /etc/nginx/fastcgi_params; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 100644 --- a/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index 0c972c79e..9f27ef4a5 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -13,7 +13,7 @@ VERSION='debian' memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9]) arch=$(uname -i) os='debian' -release=$(cat /etc/issue|grep -o [0-9]|head -n1) +release=$(cat /etc/debian_version|grep -o [0-9]|head -n1) codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))" vestacp="http://$CHOST/$VERSION/$release" diff --git a/web/inc/i18n/vi.php b/web/inc/i18n/vi.php index d960386ec..455005203 100644 --- a/web/inc/i18n/vi.php +++ b/web/inc/i18n/vi.php @@ -315,7 +315,7 @@ $LANG['vi'] = array( 'IP address' => 'Địa chỉ IP', 'netmask' => 'netmask', 'interface' => 'Giao tiếp', - 'assigned user' => 'người dùng đơ]cj chỉ định', + 'assigned user' => 'người dùng được chỉ định', 'ns1' => 'ns1', 'ns2' => 'ns2', 'user' => 'tài khoản', diff --git a/web/templates/admin/add_ip.html b/web/templates/admin/add_ip.html index 82eb13ab2..43b37d5d2 100644 --- a/web/templates/admin/add_ip.html +++ b/web/templates/admin/add_ip.html @@ -54,7 +54,7 @@ @@ -86,7 +86,7 @@ if ((!empty($v_interface)) && ( $value == $v_interface )) echo ' selected'; echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -131,7 +131,7 @@ @@ -156,4 +156,4 @@
- +
- () + ()
- \ No newline at end of file + diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index 6082af056..4480fa825 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -22,12 +22,7 @@
diff --git a/web/templates/admin/list_backup.html b/web/templates/admin/list_backup.html index 7fd908397..365a816f4 100644 --- a/web/templates/admin/list_backup.html +++ b/web/templates/admin/list_backup.html @@ -100,7 +100,7 @@
-
+
diff --git a/web/templates/admin/list_cron.html b/web/templates/admin/list_cron.html index f9ec05812..c05aa8ed4 100644 --- a/web/templates/admin/list_cron.html +++ b/web/templates/admin/list_cron.html @@ -124,7 +124,7 @@ sort-star="
-
+
diff --git a/web/templates/admin/list_db.html b/web/templates/admin/list_db.html index 7fc51d7ec..4e5e5140a 100644 --- a/web/templates/admin/list_db.html +++ b/web/templates/admin/list_db.html @@ -152,7 +152,7 @@ sort-user="" sort-server="" so
-
+
diff --git a/web/templates/admin/list_dns.html b/web/templates/admin/list_dns.html index 78ae51118..7f25b0d3c 100644 --- a/web/templates/admin/list_dns.html +++ b/web/templates/admin/list_dns.html @@ -114,7 +114,7 @@ sort-expire="" sort-records=" -
+
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html index 244c1d4a8..e4b55877b 100644 --- a/web/templates/admin/list_dns_rec.html +++ b/web/templates/admin/list_dns_rec.html @@ -98,7 +98,7 @@ v_unit_id="" v_section="dns_rec">
-
+
diff --git a/web/templates/admin/list_firewall.html b/web/templates/admin/list_firewall.html index 2c4b365e7..73990d58d 100644 --- a/web/templates/admin/list_firewall.html +++ b/web/templates/admin/list_firewall.html @@ -113,7 +113,7 @@ sort-ip="" sort-comment="
-
+
diff --git a/web/templates/admin/list_ip.html b/web/templates/admin/list_ip.html index 3906a46fa..ada609a2a 100644 --- a/web/templates/admin/list_ip.html +++ b/web/templates/admin/list_ip.html @@ -60,9 +60,9 @@ ++$i; ?> - -
\ No newline at end of file +
diff --git a/web/templates/admin/list_services.html b/web/templates/admin/list_services.html index aad7961ae..aa85671c7 100644 --- a/web/templates/admin/list_services.html +++ b/web/templates/admin/list_services.html @@ -65,7 +65,7 @@
-
+
diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html index d12ef7c8f..ae0651af8 100644 --- a/web/templates/admin/list_user.html +++ b/web/templates/admin/list_user.html @@ -95,7 +95,7 @@ sort-bandwidth="" sort-disk=" -
 L
+
 L
@@ -162,7 +162,7 @@ sort-bandwidth="" sort-disk=" -
+
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html index 9415aa2ed..7f610b1a6 100644 --- a/web/templates/admin/list_web.html +++ b/web/templates/admin/list_web.html @@ -169,7 +169,7 @@ sort-name="" sort-bandwidth="" sort-dis
-
+
diff --git a/web/templates/user/list_cron.html b/web/templates/user/list_cron.html index e3a73e227..757725ad3 100644 --- a/web/templates/user/list_cron.html +++ b/web/templates/user/list_cron.html @@ -111,7 +111,7 @@ sort-date="" sort-nam
-
+
diff --git a/web/templates/user/list_db.html b/web/templates/user/list_db.html index c03e83b24..2a80f7abc 100644 --- a/web/templates/user/list_db.html +++ b/web/templates/user/list_db.html @@ -141,7 +141,7 @@ sort-user="" sort-server="" so
-
+
diff --git a/web/templates/user/list_dns.html b/web/templates/user/list_dns.html index 616313ab8..ce5c12a5c 100644 --- a/web/templates/user/list_dns.html +++ b/web/templates/user/list_dns.html @@ -103,7 +103,7 @@ sort-expire="" sort-records=" -
+
diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index fe91f49f8..2cf428a4b 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -96,7 +96,7 @@
-
+
diff --git a/web/templates/user/list_mail.html b/web/templates/user/list_mail.html index 9eac082b5..09afc6103 100644 --- a/web/templates/user/list_mail.html +++ b/web/templates/user/list_mail.html @@ -121,7 +121,7 @@ sort-accounts="" sort-star="
-
+
diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index 0af018cfd..70bc38dc0 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -114,7 +114,7 @@ sort-star=" -
+
diff --git a/web/templates/user/list_search.html b/web/templates/user/list_search.html index 5545f2057..a8909b29a 100644 --- a/web/templates/user/list_search.html +++ b/web/templates/user/list_search.html @@ -73,7 +73,7 @@ if ($data[$key]['USER'] != $user && $data[$key]['KEY'] == 'ACCOUNT') { if ($key == $user) { ?> -
 L
+
 L
@@ -168,7 +168,7 @@
-
+
diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index d0dda28c6..e71d286a0 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -93,7 +93,7 @@ sort-disk="" sort-star=" -
 L
+
 L
@@ -150,7 +150,7 @@ sort-disk="" sort-star=" -
+
diff --git a/web/templates/user/list_web.html b/web/templates/user/list_web.html index eb78d6385..9f08d0ab9 100644 --- a/web/templates/user/list_web.html +++ b/web/templates/user/list_web.html @@ -161,7 +161,7 @@ sort-bandwidth="" sort-disk=""> -
+