mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Lint roles/nginx/templates/server.conf.j2
This commit is contained in:
parent
eb4144c08b
commit
d4b388bf4d
1 changed files with 30 additions and 30 deletions
|
@ -1,35 +1,35 @@
|
||||||
server {
|
server {
|
||||||
root {{ doc_root }};
|
root {{ doc_root }};
|
||||||
server_name {{ iiab_hostname }};
|
server_name {{ iiab_hostname }};
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|
||||||
index index.php index.html index.htm;
|
|
||||||
|
|
||||||
# let individual services drop location blocks in conf.d
|
index index.php index.html index.htm;
|
||||||
include {{ nginx_conf_dir }}/*;
|
|
||||||
|
|
||||||
location ~ .*\.php$ {
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
fastcgi_pass php;
|
|
||||||
fastcgi_index index.php;
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
|
||||||
include fastcgi_params;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /cgi-bin {
|
|
||||||
root /usr/lib;
|
|
||||||
}
|
|
||||||
|
|
||||||
# if you don't like seeing all the errors for missing favicon.ico in root
|
# let individual services drop location blocks in conf.d
|
||||||
location = /favicon.ico { access_log off; log_not_found off; }
|
include {{ nginx_conf_dir }}/*;
|
||||||
|
|
||||||
|
location ~ .*\.php$ {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
fastcgi_pass php;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
# if you don't like seeing errors for a missing robots.txt in root
|
location /cgi-bin {
|
||||||
location = /robots.txt { access_log off; log_not_found off; }
|
root /usr/lib;
|
||||||
|
}
|
||||||
# this will prevent files like .htaccess .htpassword .secret etc from being served
|
|
||||||
location ~ /\. { deny all; }
|
# if you don't like seeing all the errors for missing favicon.ico in root
|
||||||
|
location = /favicon.ico { access_log off; log_not_found off; }
|
||||||
|
|
||||||
|
# if you don't like seeing errors for a missing robots.txt in root
|
||||||
|
location = /robots.txt { access_log off; log_not_found off; }
|
||||||
|
|
||||||
|
# this will prevent files like .htaccess .htpassword .secret etc from being served
|
||||||
|
location ~ /\. { deny all; }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue