50 lines
1.3 KiB
Plaintext
50 lines
1.3 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name pcodigo.adlerneves.eti.br;
|
|
|
|
include /etc/nginx/snippets/acme.conf;
|
|
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
server_name pcodigo.adlerneves.eti.br;
|
|
|
|
charset utf-8;
|
|
client_max_body_size 15M;
|
|
|
|
root /var/www/html;
|
|
|
|
location /media {
|
|
alias /var/www/pcodigo/media;
|
|
}
|
|
|
|
location /static {
|
|
alias /var/www/pcodigo/static;
|
|
}
|
|
location / {
|
|
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 Host $http_host;
|
|
proxy_set_header X-NginX-Proxy true;
|
|
|
|
proxy_pass http://localhost:17848/;
|
|
proxy_redirect off;
|
|
|
|
# Socket.IO Support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 1d;
|
|
proxy_send_timeout 1d;
|
|
}
|
|
include /etc/nginx/snippets/tlsgzip.conf;
|
|
|
|
}
|