phpStudy2018 nginx 伪静态设置

2021年3月4日14:39:36 1

第一先站网站跟目录新建一个文件夹名称为:nginx.htaccess
phpStudy2018 nginx 伪静态设置
phpStudy2018 nginx 伪静态设置

里面内容填写:

location /
{
	 try_files $uri $uri/ /index.php?$args;
}

rewrite /wp-admin$ $scheme://$host$uri/ permanent;


在修改文件:F:\phpStudy\PHPTutorial\nginx\conf

phpStudy2018 nginx 伪静态设置

phpStudy2018 nginx 伪静态设置

 

第二引用

打开: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;
        }
}

 

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:1   其中:访客  0   博主  0

    • 容添下 容添下 0

      麻雀虽小五脏俱全