Answer the question
In order to leave comments, you need to log in
How to setup files for download in nginx?
Hi friends.
There is a simple config:
# фронт
server {
listen 80;
server_name mysite.ru;
root /var/www/crm/elc/frontend/web;
index index.php;
error_log /var/www/logs/crm.error.log;
access_log /var/www/logs/crm.access.log;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Answer the question
In order to leave comments, you need to log in
File extensions have nothing to do with it. Make sure that the files are located exactly in /var/www/crm/elc/frontend/web
and when requested, nothing is messed up with the case of characters (or even better - bring the names to the lower one), and also that the www-data user (or another one from which the web server is running) has read permissions for these files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question