Files
haproxy-protection/nginx3/nginx.conf
2025-03-16 15:55:49 +11:00

21 lines
438 B
Nginx Configuration File

server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri; # Redirect HTTP to HTTPS
}
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /etc/nginx/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/nginx/certs/nginx-selfsigned.key;
location / {
root /usr/share/nginx/html; # Change this to your document root
index index.html index.htm;
}
}