Skip to content

Instantly share code, notes, and snippets.

@kain-jy
Created December 8, 2012 05:33
Show Gist options
  • Save kain-jy/4238790 to your computer and use it in GitHub Desktop.
Save kain-jy/4238790 to your computer and use it in GitHub Desktop.
[nginx][config] fuelphp+php-fpm
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