Created
April 1, 2014 10:57
-
-
Save xianhuazhou/9911834 to your computer and use it in GitHub Desktop.
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
server { | |
listen 80; | |
server_name laravel; | |
root /var/www/laravel/public; | |
error_log /usr/local/nginx/logs/laravel.error.log; | |
access_log /usr/local/nginx/logs/laravel.access.log; | |
location / { | |
index index.php; | |
try_files $uri $uri/ @laravelapp; | |
} | |
location @laravelapp { | |
rewrite ^ /index.php last; | |
} | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
location ~ \.php(/|$) { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment