方法二:配置虚拟主机
直接将一下代码粘贴到nginx的配置文件的
#location ~ /\.ht {
# deny all;
#}
}
的下面
server {
listen 80;
server_name 域名;
location / {
root 根目录;
index index.html index.htm index.php;
}
location ~ \.php$ {
root 根目录;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#location ~ /.ht {
# deny all;
#}
}
直接将一下代码粘贴到nginx的配置文件的
#location ~ /\.ht {
# deny all;
#}
}
的下面
server {
listen 80;
server_name 域名;
location / {
root 根目录;
index index.html index.htm index.php;
}
location ~ \.php$ {
root 根目录;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#location ~ /.ht {
# deny all;
#}
}