35 lines
992 B
Plaintext
35 lines
992 B
Plaintext
|
|
# Example Nginx config for SMOA backend (reverse proxy + TLS).
|
||
|
|
# Place in /etc/nginx/sites-available/ and symlink to sites-enabled.
|
||
|
|
# Replace smoa.example.com and paths with your values.
|
||
|
|
|
||
|
|
upstream smoa_backend {
|
||
|
|
server 127.0.0.1:8080;
|
||
|
|
keepalive 32;
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name smoa.example.com;
|
||
|
|
return 301 https://$server_name$request_uri;
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 443 ssl http2;
|
||
|
|
server_name smoa.example.com;
|
||
|
|
|
||
|
|
ssl_certificate /etc/ssl/certs/smoa.example.com.crt;
|
||
|
|
ssl_certificate_key /etc/ssl/private/smoa.example.com.key;
|
||
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
proxy_pass http://smoa_backend;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
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;
|
||
|
|
proxy_set_header Connection "";
|
||
|
|
}
|
||
|
|
}
|