0
Hello connoisseurs of Nginx I would like to enable the rewrite and modify root folder
what permission command and how to do this successfully because when accessing download the file instead of displaying and I am frustrated c/ so little content found.
my code:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://www.$host$request_uri;
}
server {
listen 443 ssl http2;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/example.com/chain.pem;
include snippets/ssl.conf;
include snippets/letsencrypt.conf;
root /var/www/html;
index index.html index.php index.htm index.nginx-debian.html;
server_name example.com www.example.com;
location / {
try_files $uri $uri/ =404;
}
}
php 7.4 installed