mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
21 lines
438 B
Nginx Configuration File
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;
|
|
}
|
|
}
|
|
|