Created
August 10, 2016 15:11
-
-
Save Nyoho/6c4746491fed5bc43250b33426e0d7a3 to your computer and use it in GitHub Desktop.
nginx の PHP 設定
This file contains hidden or 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; ## listen for ipv4; this line is default and implied | |
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6 | |
root /var/www/hogehogeserver; | |
index index.html index.htm index.php; | |
server_name hogehogeserver.example.net; | |
location / { | |
auth_basic "Restricted"; | |
auth_basic_user_file /var/www/hogehogeserver/.htpasswd; | |
} | |
location ~ \.(php)$ { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
error_log /var/log/nginx/hogehogeserver-error.log; | |
access_log /var/log/nginx/hogehogeserver-access.log; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment