第一先站网站跟目录新建一个文件夹名称为:nginx.htaccess
里面内容填写:
location /
{
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
在修改文件:F:\phpStudy\PHPTutorial\nginx\conf
第二引用
打开:vhosts.conf
server {
listen 80;
server_name www.haitaoketang.cn 域名.com;
root "F:\phpStudy\PHPTutorial\WWW\域名.com";
location / {
index index.html index.htm index.php;
include F:/phpStudy/PHPTutorial/WWW/域名.com/nginx.htaccess;
#autoindex on;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
2021年6月5日 下午5:21 沙发
麻雀虽小五脏俱全