Update nginx config from example
This commit is contained in:
parent
e7864d9a0c
commit
3e7fbc4c4a
@ -35,23 +35,26 @@ http {
|
|||||||
|
|
||||||
root /data/;
|
root /data/;
|
||||||
|
|
||||||
|
# Friendly URL support
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php?route=$uri&$args;
|
try_files $uri $uri/ /index.php?route=$uri&$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Deny access to some file types and directories
|
||||||
location ~ \.(tpl|cache|htaccess)$ {
|
location ~ \.(tpl|cache|htaccess)$ {
|
||||||
return 403;
|
return 403;
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /robots.txt {
|
location ^~ /node_modules/ {
|
||||||
allow all;
|
return 403;
|
||||||
log_not_found off;
|
}
|
||||||
access_log off;
|
|
||||||
|
location ^~ /scripts/ {
|
||||||
|
return 403;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include /tmp/fastcgi-pass.conf;
|
include /tmp/fastcgi-pass.conf;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user