Skip to content

Commit

Permalink
Update nginx config from example
Browse files Browse the repository at this point in the history
  • Loading branch information
Derkades committed May 28, 2022
1 parent e7864d9 commit 3e7fbc4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions nginx_web/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,26 @@ http {

root /data/;

# Friendly URL support
location / {
try_files $uri $uri/ /index.php?route=$uri&$args;
}

# Deny access to some file types and directories
location ~ \.(tpl|cache|htaccess)$ {
return 403;
}

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
location ^~ /node_modules/ {
return 403;
}

location ^~ /scripts/ {
return 403;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /tmp/fastcgi-pass.conf;
Expand Down

0 comments on commit 3e7fbc4

Please sign in to comment.