Answer the question
In order to leave comments, you need to log in
How to configure NGINX for static files (images)?
There are directories. It contains pictures, and nothing but pictures. You need to give these pictures on a subdomain. I do:
server {
listen 443;
ssl on;
ssl_certificate /root/certificate.crt;
ssl_certificate_key /root/private.key;
server_name static.v.by;
root /root/v/server/storage/images;
location / {
include /etc/nginx/mime.types;
try_files $uri $uri/ =404;
}
}
Answer the question
In order to leave comments, you need to log in
Specify a link to the static folder of your project
location /static {
include /etc/nginx/mime.types;
root /home/rm/legionwar.lightning-team.ovh/src;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question