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

31 lines
808 B
Plaintext

server {
listen 192.168.1.2:80;
server_name 898.ro www.898.ro;
charset utf-8;
root /var/www/html;
index index.html;
access_log /var/log/nginx/898.ro.access.log;
error_log /var/log/nginx/898.ro.error.log;
# gzip should not be used with SSL
gzip off;
listen 192.168.1.2:443 ssl http2;
ssl_certificate /etc/letsencrypt/live/www.898.ro/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.898.ro/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
# redirect www.898.ro to 898.ro for both HTTP and HTTPS
if ($host = www.898.ro) {
return 301 $scheme://898.ro$request_uri;
}
# default location - proxy to local Jekyll
location / {
proxy_pass http://127.0.0.1:4000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
}