Created
July 10, 2013 15:15
-
-
Save dhayab/5967162 to your computer and use it in GitHub Desktop.
Laravel 4 nginx template (from 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