mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-26 00:23:33 +03:00
Correct NGINX downloading files instead of showing 404 for non-existing URL routes
This commit is contained in:
parent
5473544258
commit
a9e7cea12a
1 changed files with 7 additions and 3 deletions
|
@ -7,14 +7,14 @@ server {
|
|||
|
||||
access_log /var/log/nginx/application.access.log;
|
||||
|
||||
root /var/www/html/.;
|
||||
root /var/www/html;
|
||||
|
||||
index index.php;
|
||||
index index.php index.html;
|
||||
|
||||
# try to serve file directly, fallback to index.php
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args =404;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location ~ ^.+.php {
|
||||
|
@ -27,4 +27,8 @@ server {
|
|||
fastcgi_buffer_size 32k;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue