nginx配置wordpress方法

server {
        listen  80;
        server_name  wp.gsj.com;
        set $web_root /www/php/wp.gsj.com; 
        
        location / {
            root   $web_root;
            index  index.php;
            try_files  $uri $uri/ /index.php?$args;
        }
        
        location ~ .php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $web_root$fastcgi_script_name;
            include        fastcgi_params;
        }
}
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐