24 lines
455 B
Nginx Configuration File
24 lines
455 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name mai.example.org;
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name mai.example.org;
|
|
|
|
ssl_certificate /path/to/fullchain.pem;
|
|
ssl_certificate_key /path/to/privkey.pem;
|
|
|
|
location / {
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_pass http://localhost:5000;
|
|
}
|
|
}
|