Skip to content

Instantly share code, notes, and snippets.

@golf1052
Created December 19, 2014 23:54
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 golf1052/ab323071c3abb16c94c0 to your computer and use it in GitHub Desktop.
Save golf1052/ab323071c3abb16c94c0 to your computer and use it in GitHub Desktop.
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name golf1052.com;
location / {
root /var/www/golf1052.com/public_html;
index default.html;
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 80;
server_name blog.golf1052.com;
access_log /var/log/nginx/ghost.log
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:2368;
proxy_redirect off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment