Skip to content

Instantly share code, notes, and snippets.

@prog-it
Created August 5, 2015 08:05
Show Gist options
  • Save prog-it/229e53b543d6a54889dc to your computer and use it in GitHub Desktop.
Save prog-it/229e53b543d6a54889dc to your computer and use it in GitHub Desktop.
nginx config
server {
listen 99;
root /var/www/my/;
error_log /var/www/my/error_rapple.log;
access_log /var/www/my/access_rapple.log;
server_name rapple.com.ua;
location / {
index index.php index.html index.htm;
auth_basic "Asterisk";
auth_basic_user_file /path/to/.htpasswd;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REMOTE_USER $remote_user;
include fastcgi_params;
error_page 404 /404.php;
fastcgi_intercept_errors on;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REMOTE_USER $remote_user;
include fastcgi_params;
error_page 404 /404.php;
fastcgi_intercept_errors on;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment