Skip to content

Instantly share code, notes, and snippets.

@tanftw
Last active November 14, 2018 05:52
Show Gist options
  • Save tanftw/c522867b8e406e72e897050dedd05c08 to your computer and use it in GitHub Desktop.
Save tanftw/c522867b8e406e72e897050dedd05c08 to your computer and use it in GitHub Desktop.
Nginx Vhost WSL
server {
listen 80;
root /var/www/code/wp;
index index.php index.html index.htm index.nginx-debian.html;
server_name wp.test;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_buffering off;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment