Answer the question
In order to leave comments, you need to log in
How to set up downloading non-php files in nginx if all requests go to index.php?
I have nginx installed, these are my local site settings
server {
listen 80;
root /home/varvoid/php_projects/p1.lo/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name p1.lo www.p1.lo;
location / {
try_files $uri $uri/ @missing;
}
# Rewrite 404s back to PHP
location @missing {
rewrite ^ /index.php last;
}
# pass PHP scripts to FastCGI server
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question