57 lines
1.5 KiB
Text
57 lines
1.5 KiB
Text
|
|
server {
|
||
|
|
listen 443 ssl;
|
||
|
|
server_name element.YOURDOMAIN.COM;
|
||
|
|
|
||
|
|
http2 on;
|
||
|
|
|
||
|
|
ssl_certificate /etc/letsencrypt/live/element.YOURDOMAIN.COM/fullchain.pem;
|
||
|
|
ssl_certificate_key /etc/letsencrypt/live/element.YOURDOMAIN.COM/privkey.pem;
|
||
|
|
|
||
|
|
gzip on;
|
||
|
|
gzip_types text/plain text/css application/json application/javascript application/xml text/javascript;
|
||
|
|
gzip_min_length 256;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
proxy_pass http://127.0.0.1:8445;
|
||
|
|
|
||
|
|
proxy_set_header Connection "upgrade";
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Forwarded-Server $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;
|
||
|
|
|
||
|
|
|
||
|
|
#unrelated ccs and background injection
|
||
|
|
|
||
|
|
#add_header X-Frame-Options SAMEORIGIN;
|
||
|
|
#add_header X-Content-Type-Options nosniff;
|
||
|
|
#add_header X-XSS-Protection "1; mode=block";
|
||
|
|
#add_header Content-Security-Policy "frame-ancestors 'self'";
|
||
|
|
|
||
|
|
#proxy_set_header Accept-Encoding "";
|
||
|
|
# sub_filter_once off;
|
||
|
|
# sub_filter '</head>' '<link rel="stylesheet" href="/custom.css"></head>';
|
||
|
|
# }
|
||
|
|
|
||
|
|
# location /custom.css {
|
||
|
|
# alias /var/www/html/nginx/custom_element.css;
|
||
|
|
# default_type text/css;
|
||
|
|
# add_header Access-Control-Allow-Origin *;
|
||
|
|
#}
|
||
|
|
|
||
|
|
|
||
|
|
# location /themes/element/img/backgrounds/lake.jpg {
|
||
|
|
# alias /var/www/html/nginx/background.jpg;
|
||
|
|
# add_header Access-Control-Allow-Origin *;
|
||
|
|
# }
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|