Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Nginx : Ghost SSL Config
#Nginx Ghost Config
server {
listen 80;
rewrite ^(.*) https://$host$1 permanent;
# the secure nginx server instance
server {
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/somedomain.crt;
ssl_certificate_key /etc/nginx/ssl/somedomain.key;
access_log /var/log/nginx/myapp.log;
error_log /var/log/nginx/myapp_error.log;
root /app/ghost/system/nginx-root;
location ^~ /blog {
proxy_redirect off;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header 'Access-Control-Allow-Origin' '*';
proxy_set_header 'Access-Control-Allow-Credentials' true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
location ~ /.well-known {
allow all;
client_max_body_size 50m;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.