ghost.conf 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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;
  11. server_name ${SERVICE_DOMAIN};
  12. ssl on;
  13. ssl_certificate /etc/nginx/ssl/${SERVICE_DOMAIN}/cert.pem;
  14. ssl_certificate_key /etc/nginx/ssl/${SERVICE_DOMAIN}/key.pem;
  15. include /etc/nginx/includes/ssl.conf;
  16. add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
  17. add_header X-Frame-Options DENY;
  18. add_header X-Content-Type-Options nosniff;
  19. include /etc/nginx/includes/gzip.conf;
  20. location / {
  21. proxy_pass http://ghost/;
  22. proxy_set_header Host $http_host; # required for docker client's sake
  23. proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
  24. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25. proxy_set_header X-Forwarded-Proto $scheme;
  26. proxy_read_timeout 900;
  27. }
  28. location ~ /.well-known {
  29. allow all;
  30. root /var/www/html;
  31. }
  32. }