Skip to content

Instantly share code, notes, and snippets.

@kiennt2
Created September 25, 2017 08:40
Show Gist options
  • Save kiennt2/1c0d4459c15b804058b9e6281468a0af to your computer and use it in GitHub Desktop.
Save kiennt2/1c0d4459c15b804058b9e6281468a0af to your computer and use it in GitHub Desktop.
Wordpress - nginx config
server {
listen 80;
listen [::]:80;
server_name dev.domain.com;
root /home/kiennguyen/projects/foldername;
index index.php index.html index.htm;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_read_timeout 3000;
fastcgi_param SCRIPT_FILENAME /home/kiennguyen/projects/foldername$fastcgi_script_name;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment