Created
October 7, 2013 17:09
-
-
Save trizz/6871398 to your computer and use it in GitHub Desktop.
Laravel 4 nginx template (source: http://daylerees.com/nginx-configuration-for-daylerees-dot-com)
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
# Rewrite for content. | |
if (!-d $request_filename) { | |
rewrite ^/(.+)/$ /$1 permanent; | |
} | |
location ~* \.php$ { | |
# Server PHP config. | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
# Typical vars in here, nothing interesting. | |
include /etc/nginx/fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location ~ /\.ht { | |
# Hells no, we usin nginx up in this mutha. (deny .htaccess) | |
deny all; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment