Skip to content

Instantly share code, notes, and snippets.

@katpadi
Created July 7, 2014 14:17
Show Gist options
  • Save katpadi/5581e4dbc2868633dca5 to your computer and use it in GitHub Desktop.
Save katpadi/5581e4dbc2868633dca5 to your computer and use it in GitHub Desktop.
WordPress x NGINX
server {
server_name blog.katpadi.ph www.blog.katpadi.ph;
access_log /var/log/nginx/katpadi.ph.access.log;
error_log /var/log/nginx/katpadi.ph.error.log;
root /var/www;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
server {
listen 80;
server_name katpadi.ph www.katpadi.ph;
root /var/katpadi;
location / {
root /var/katpadi;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment