ghost.conf 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. upstream ghost {
  2. server ghost-service-dockerbunker:2368;
  3. }
  4. server {
  5. listen 80;
  6. server_name ${SERVICE_DOMAIN};
  7. return 301 https://$host$request_uri;
  8. }
  9. server {
  10. listen 443 ssl;
  11. server_name ${SERVICE_DOMAIN};
  12. ssl_certificate /etc/nginx/ssl/${SERVICE_DOMAIN}/cert.pem;
  13. ssl_certificate_key /etc/nginx/ssl/${SERVICE_DOMAIN}/key.pem;
  14. include /etc/nginx/includes/ssl.conf;
  15. add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
  16. add_header X-Frame-Options DENY;
  17. add_header X-Content-Type-Options nosniff;
  18. include /etc/nginx/includes/gzip.conf;
  19. location / {
  20. proxy_pass http://ghost/;
  21. proxy_set_header Host $http_host; # required for docker client's sake
  22. proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
  23. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  24. proxy_set_header X-Forwarded-Proto $scheme;
  25. proxy_read_timeout 900;
  26. }
  27. location ~ /.well-known {
  28. allow all;
  29. root /var/www/html;
  30. }
  31. }