Last active
January 21, 2019 16:46
-
-
Save raksa/0f30bd4022ebb9055d6581dd70ba5457 to your computer and use it in GitHub Desktop.
nginx + php for Laravel project on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run php-cgi.php -b 127.0.0.1:9123 | |
server { | |
listen 8000; | |
listen [::]:8000; | |
server_name blog.local; | |
root c:/www/blog; | |
index index.php index.html index.htm index.nginx-debian.html; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
fastcgi_pass 127.0.0.1:9123; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~ \.css { | |
add_header Content-Type text/css; | |
} | |
location ~ \.js { | |
add_header Content-Type application/x-javascript; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment