Files
zira-etc/nginx/conf.d/files.898.ro.conf

34 lines
906 B
Plaintext

server {
listen 192.168.1.2:80;
server_name files.898.ro;
charset utf-8;
root /var/www/html/afiles;
index index.php index.html index.htm;
access_log /var/log/nginx/files.898.ro.access.log;
error_log /var/log/nginx/files.898.ro.error.log;
# gzip should not be used with SSL
gzip off;
listen 192.168.1.2:443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/files.898.ro/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/files.898.ro/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
location / {
proxy_pass https://localhost:8011;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
### redirect
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}