123456789101112131415161718192021222324252627282930313233343536373839 |
- upstream ghost {
- server ghost-service-dockerbunker:2368;
- }
- server {
- listen 80;
- server_name ${SERVICE_DOMAIN};
- return 301 https://$host$request_uri;
- }
- server {
- listen 443;
- server_name ${SERVICE_DOMAIN};
- ssl on;
- ssl_certificate /etc/nginx/ssl/${SERVICE_DOMAIN}/cert.pem;
- ssl_certificate_key /etc/nginx/ssl/${SERVICE_DOMAIN}/key.pem;
- include /etc/nginx/includes/ssl.conf;
- add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
- add_header X-Frame-Options DENY;
- add_header X-Content-Type-Options nosniff;
- include /etc/nginx/includes/gzip.conf;
- location / {
- proxy_pass http://ghost/;
- proxy_set_header Host $http_host; # required for docker client's sake
- proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_read_timeout 900;
- }
- location ~ /.well-known {
- allow all;
- root /var/www/html;
- }
- }
|