Skip to content

Commit 9c655bf

Browse files
author
Roman Sadoyan
committed
MODX nginx template added
1 parent 5e861eb commit 9c655bf

File tree

26 files changed

+1612
-0
lines changed

26 files changed

+1612
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
server {
2+
listen %ip%:%web_ssl_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%;
5+
index index.php index.html index.htm;
6+
access_log /var/log/nginx/domains/%domain%.log combined;
7+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
8+
error_log /var/log/nginx/domains/%domain%.error.log error;
9+
10+
ssl on;
11+
ssl_certificate %ssl_pem%;
12+
ssl_certificate_key %ssl_key%;
13+
# if you need to rewrite www to non-www uncomment bellow
14+
# if ($host != '%domain%' ) {
15+
# rewrite ^/(.*)$ https://%domain%/$1 permanent;
16+
# }
17+
location = /favicon.ico {
18+
log_not_found off;
19+
access_log off;
20+
}
21+
22+
location = /robots.txt {
23+
allow all;
24+
log_not_found off;
25+
access_log off;
26+
}
27+
28+
location / {
29+
try_files $uri $uri/ @rewrite;
30+
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
31+
expires max;
32+
}
33+
}
34+
location @rewrite {
35+
rewrite ^/(.*)$ /index.php?q=$1;
36+
}
37+
38+
location ~ \.php$ {
39+
try_files $uri =404;
40+
fastcgi_pass %backend_lsnr%;
41+
fastcgi_index index.php;
42+
fastcgi_param SCRIPT_FILENAME $request_filename;
43+
include /etc/nginx/fastcgi_params;
44+
}
45+
46+
error_page 403 /error/404.html;
47+
error_page 404 /error/404.html;
48+
error_page 500 502 503 504 /error/50x.html;
49+
50+
location /error/ {
51+
alias %home%/%user%/web/%domain%/document_errors/;
52+
}
53+
54+
location ~* "/\.(htaccess|htpasswd)$" {
55+
deny all;
56+
return 404;
57+
}
58+
59+
include /etc/nginx/conf.d/phpmyadmin.inc*;
60+
include /etc/nginx/conf.d/phppgadmin.inc*;
61+
include /etc/nginx/conf.d/webmail.inc*;
62+
63+
include %home%/%user%/conf/web/nginx.%domain%.conf*;
64+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
server {
2+
listen %ip%:%web_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%;
5+
index index.php index.html index.htm;
6+
access_log /var/log/nginx/domains/%domain%.log combined;
7+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
8+
error_log /var/log/nginx/domains/%domain%.error.log error;
9+
# if you need to rewrite www to non-www uncomment bellow
10+
# if ($host != '%domain%' ) {
11+
# rewrite ^/(.*)$ http://%domain%/$1 permanent;
12+
# }
13+
location = /favicon.ico {
14+
log_not_found off;
15+
access_log off;
16+
}
17+
18+
location = /robots.txt {
19+
allow all;
20+
log_not_found off;
21+
access_log off;
22+
}
23+
24+
location / {
25+
try_files $uri $uri/ @rewrite;
26+
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
27+
expires max;
28+
}
29+
}
30+
location @rewrite {
31+
rewrite ^/(.*)$ /index.php?q=$1;
32+
}
33+
34+
location ~ \.php$ {
35+
try_files $uri =404;
36+
fastcgi_pass %backend_lsnr%;
37+
fastcgi_index index.php;
38+
fastcgi_param SCRIPT_FILENAME $request_filename;
39+
include /etc/nginx/fastcgi_params;
40+
}
41+
42+
error_page 403 /error/404.html;
43+
error_page 404 /error/404.html;
44+
error_page 500 502 503 504 /error/50x.html;
45+
46+
location /error/ {
47+
alias %home%/%user%/web/%domain%/document_errors/;
48+
}
49+
50+
location ~* "/\.(htaccess|htpasswd)$" {
51+
deny all;
52+
return 404;
53+
}
54+
55+
include /etc/nginx/conf.d/phpmyadmin.inc*;
56+
include /etc/nginx/conf.d/phppgadmin.inc*;
57+
include /etc/nginx/conf.d/webmail.inc*;
58+
59+
include %home%/%user%/conf/web/nginx.%domain%.conf*;
60+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
server {
2+
listen %ip%:%web_ssl_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%;
5+
index index.php index.html index.htm;
6+
access_log /var/log/nginx/domains/%domain%.log combined;
7+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
8+
error_log /var/log/nginx/domains/%domain%.error.log error;
9+
10+
ssl on;
11+
ssl_certificate %ssl_pem%;
12+
ssl_certificate_key %ssl_key%;
13+
# if you need to rewrite www to non-www uncomment bellow
14+
# if ($host != '%domain%' ) {
15+
# rewrite ^/(.*)$ https://%domain%/$1 permanent;
16+
# }
17+
location = /favicon.ico {
18+
log_not_found off;
19+
access_log off;
20+
}
21+
22+
location = /robots.txt {
23+
allow all;
24+
log_not_found off;
25+
access_log off;
26+
}
27+
28+
location / {
29+
try_files $uri $uri/ @rewrite;
30+
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
31+
expires max;
32+
}
33+
}
34+
location @rewrite {
35+
rewrite ^/(.*)$ /index.php?q=$1;
36+
}
37+
38+
location ~ \.php$ {
39+
try_files $uri =404;
40+
fastcgi_pass %backend_lsnr%;
41+
fastcgi_index index.php;
42+
fastcgi_param SCRIPT_FILENAME $request_filename;
43+
include /etc/nginx/fastcgi_params;
44+
}
45+
46+
error_page 403 /error/404.html;
47+
error_page 404 /error/404.html;
48+
error_page 500 502 503 504 /error/50x.html;
49+
50+
location /error/ {
51+
alias %home%/%user%/web/%domain%/document_errors/;
52+
}
53+
54+
location ~* "/\.(htaccess|htpasswd)$" {
55+
deny all;
56+
return 404;
57+
}
58+
59+
include /etc/nginx/conf.d/phpmyadmin.inc*;
60+
include /etc/nginx/conf.d/phppgadmin.inc*;
61+
include /etc/nginx/conf.d/webmail.inc*;
62+
63+
include %home%/%user%/conf/web/nginx.%domain%.conf*;
64+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
server {
2+
listen %ip%:%web_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%;
5+
index index.php index.html index.htm;
6+
access_log /var/log/nginx/domains/%domain%.log combined;
7+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
8+
error_log /var/log/nginx/domains/%domain%.error.log error;
9+
# if you need to rewrite www to non-www uncomment bellow
10+
# if ($host != '%domain%' ) {
11+
# rewrite ^/(.*)$ http://%domain%/$1 permanent;
12+
# }
13+
location = /favicon.ico {
14+
log_not_found off;
15+
access_log off;
16+
}
17+
18+
location = /robots.txt {
19+
allow all;
20+
log_not_found off;
21+
access_log off;
22+
}
23+
24+
location / {
25+
try_files $uri $uri/ @rewrite;
26+
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
27+
expires max;
28+
}
29+
}
30+
location @rewrite {
31+
rewrite ^/(.*)$ /index.php?q=$1;
32+
}
33+
34+
location ~ \.php$ {
35+
try_files $uri =404;
36+
fastcgi_pass %backend_lsnr%;
37+
fastcgi_index index.php;
38+
fastcgi_param SCRIPT_FILENAME $request_filename;
39+
include /etc/nginx/fastcgi_params;
40+
}
41+
42+
error_page 403 /error/404.html;
43+
error_page 404 /error/404.html;
44+
error_page 500 502 503 504 /error/50x.html;
45+
46+
location /error/ {
47+
alias %home%/%user%/web/%domain%/document_errors/;
48+
}
49+
50+
location ~* "/\.(htaccess|htpasswd)$" {
51+
deny all;
52+
return 404;
53+
}
54+
55+
include /etc/nginx/conf.d/phpmyadmin.inc*;
56+
include /etc/nginx/conf.d/phppgadmin.inc*;
57+
include /etc/nginx/conf.d/webmail.inc*;
58+
59+
include %home%/%user%/conf/web/nginx.%domain%.conf*;
60+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
server {
2+
listen %ip%:%web_ssl_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%;
5+
index index.php index.html index.htm;
6+
access_log /var/log/nginx/domains/%domain%.log combined;
7+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
8+
error_log /var/log/nginx/domains/%domain%.error.log error;
9+
10+
ssl on;
11+
ssl_certificate %ssl_pem%;
12+
ssl_certificate_key %ssl_key%;
13+
# if you need to rewrite www to non-www uncomment bellow
14+
# if ($host != '%domain%' ) {
15+
# rewrite ^/(.*)$ https://%domain%/$1 permanent;
16+
# }
17+
location = /favicon.ico {
18+
log_not_found off;
19+
access_log off;
20+
}
21+
22+
location = /robots.txt {
23+
allow all;
24+
log_not_found off;
25+
access_log off;
26+
}
27+
28+
location / {
29+
try_files $uri $uri/ @rewrite;
30+
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
31+
expires max;
32+
}
33+
}
34+
location @rewrite {
35+
rewrite ^/(.*)$ /index.php?q=$1;
36+
}
37+
38+
location ~ \.php$ {
39+
try_files $uri =404;
40+
fastcgi_pass %backend_lsnr%;
41+
fastcgi_index index.php;
42+
fastcgi_param SCRIPT_FILENAME $request_filename;
43+
include /etc/nginx/fastcgi_params;
44+
}
45+
46+
error_page 403 /error/404.html;
47+
error_page 404 /error/404.html;
48+
error_page 500 502 503 504 /error/50x.html;
49+
50+
location /error/ {
51+
alias %home%/%user%/web/%domain%/document_errors/;
52+
}
53+
54+
location ~* "/\.(htaccess|htpasswd)$" {
55+
deny all;
56+
return 404;
57+
}
58+
59+
include /etc/nginx/conf.d/phpmyadmin.inc*;
60+
include /etc/nginx/conf.d/phppgadmin.inc*;
61+
include /etc/nginx/conf.d/webmail.inc*;
62+
63+
include %home%/%user%/conf/web/nginx.%domain%.conf*;
64+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
server {
2+
listen %ip%:%web_port%;
3+
server_name %domain_idn% %alias_idn%;
4+
root %docroot%;
5+
index index.php index.html index.htm;
6+
access_log /var/log/nginx/domains/%domain%.log combined;
7+
access_log /var/log/nginx/domains/%domain%.bytes bytes;
8+
error_log /var/log/nginx/domains/%domain%.error.log error;
9+
# if you need to rewrite www to non-www uncomment bellow
10+
# if ($host != '%domain%' ) {
11+
# rewrite ^/(.*)$ http://%domain%/$1 permanent;
12+
# }
13+
location = /favicon.ico {
14+
log_not_found off;
15+
access_log off;
16+
}
17+
18+
location = /robots.txt {
19+
allow all;
20+
log_not_found off;
21+
access_log off;
22+
}
23+
24+
location / {
25+
try_files $uri $uri/ @rewrite;
26+
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
27+
expires max;
28+
}
29+
}
30+
location @rewrite {
31+
rewrite ^/(.*)$ /index.php?q=$1;
32+
}
33+
34+
location ~ \.php$ {
35+
try_files $uri =404;
36+
fastcgi_pass %backend_lsnr%;
37+
fastcgi_index index.php;
38+
fastcgi_param SCRIPT_FILENAME $request_filename;
39+
include /etc/nginx/fastcgi_params;
40+
}
41+
42+
error_page 403 /error/404.html;
43+
error_page 404 /error/404.html;
44+
error_page 500 502 503 504 /error/50x.html;
45+
46+
location /error/ {
47+
alias %home%/%user%/web/%domain%/document_errors/;
48+
}
49+
50+
location ~* "/\.(htaccess|htpasswd)$" {
51+
deny all;
52+
return 404;
53+
}
54+
55+
include /etc/nginx/conf.d/phpmyadmin.inc*;
56+
include /etc/nginx/conf.d/phppgadmin.inc*;
57+
include /etc/nginx/conf.d/webmail.inc*;
58+
59+
include %home%/%user%/conf/web/nginx.%domain%.conf*;
60+
}

0 commit comments

Comments
 (0)