Last active
August 29, 2015 14:14
-
-
Save tiancheng91/6c4bd2ce398f750d3dc5 to your computer and use it in GitHub Desktop.
nginx config for laravel app
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.com; | |
root /root/laravel/public; | |
index index.php index.html; | |
location / { | |
location /static/ { | |
access_log off; | |
expires 10d; | |
add_header Pragma public; | |
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | |
} | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_read_timeout 300; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | |
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