Skip to content

Instantly share code, notes, and snippets.

@dexafree
Created June 30, 2014 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dexafree/2fc451cb033bdb511a62 to your computer and use it in GitHub Desktop.
Save dexafree/2fc451cb033bdb511a62 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name www.TUDOMINIO.com TUDOMINIO.com;
if ($host = 'localhost' ) {
rewrite ^/(.*)$ http://www.TUDOMINIO.com/$1 permanent;
}
location ~ ^/(ghost/signup/) {
rewrite ^/(.*)$ http:/www.TUDOMINIO.com/ permanent;
}
location ~ ^/(img/|css/|lib/|vendor/|fonts/|robots.txt|humans.txt) {
root /TURUTA/core/client/assets;
access_log off;
expires max;
}
location ~ ^/(shared/|built/) {
root /TURUTA/core;
access_log off;
expires max;
}
location ~ ^/(favicon.ico) {
root /TURUTA/core/shared;
access_log off;
expires max;
}
location ~ ^/(content/images/) {
root /TURUTA;
access_log off;
expires max;
}
location / {
proxy_redirect off;
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;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_cache one;
proxy_cache_key ghost$request_uri$scheme;
proxy_pass http://ghost_upstream;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment