Add custom "hook folders" /etc/nginx/{server.d,location.d}
This commit is contained in:
parent
271d123846
commit
4b6ebf31c6
12 changed files with 46 additions and 0 deletions
|
@ -2,5 +2,6 @@ server {
|
|||
listen 80;
|
||||
server_name ~^(?!www.)(?<domain>.+)$;
|
||||
|
||||
include /etc/nginx/server.d/*.conf;
|
||||
return {{REDIRECT_CODE}} {{REDIRECT_PROTO}}://www.$domain$request_uri;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name ~^www.(?<domain>.+)$;
|
||||
|
||||
include /etc/nginx/server.d/*.conf;
|
||||
return {{REDIRECT_CODE}} {{REDIRECT_PROTO}}://$domain$request_uri;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,12 @@ server {
|
|||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
include /etc/nginx/location.d/*.conf;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include /etc/nginx/location.d/*.conf;
|
||||
fastcgi_pass [::]:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
@ -18,4 +20,5 @@ server {
|
|||
fastcgi_param SERVER_SOFTWARE "";
|
||||
}
|
||||
|
||||
include /etc/nginx/server.d/*.conf;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue