Created
December 8, 2012 05:33
-
-
Save kain-jy/4238790 to your computer and use it in GitHub Desktop.
[nginx][config] fuelphp+php-fpm
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 host.example.com; | |
charset utf-8; | |
access_log /var/log/nginx/host.example.access.log main; | |
error_log /var/log/nginx/host.example.error.log; | |
index index.php; | |
root /path/to/public; | |
location / { | |
auth_basic on; | |
auth_basic_user_file /path/to/.htpasswd; | |
try_files $uri /index.php?$uri&$args; | |
} | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param FUEL_ENV development; | |
include fastcgi_params; | |
} | |
location ~ /\. { | |
access_log off; | |
log_not_found off; | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment