Files
homaroma/serverinfo/192.168.1.24/admin.foxxio.ddcsprocket.com.conf
T

35 lines
1.1 KiB
Plaintext

server {
server_name admin.foxxio.ddcsprocket.com;
location / {
proxy_pass http://192.168.1.26;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection 'upgrade';
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# เพื่อรองรับการยืนยัน ssl จาก certbot
location ~ /.well-known/acme-challenge {
allow all;
root /var/www/html;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/admin.foxxio.ddcsprocket.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/admin.foxxio.ddcsprocket.com/privkey.pem; # managed by Certbot
}
server {
if ($host = admin.foxxio.ddcsprocket.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name admin.foxxio.ddcsprocket.com;
return 404; # managed by Certbot
}