标签:nginx
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
location ~ .*\.(php|php5)?$ {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
auth_basic "Authorized users only";
auth_basic_user_file /usr/local/nginx/conf/auth.conf;
}
/sbin/nginx -t 查看配置文件对不对
/sbin/nginx -s reload 重置配置文件
标签:nginx
原文地址:http://1175667160.blog.51cto.com/8979146/1542446