欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

用于wordpress站点的nginx服务器配置PHP wordpress系统 wordpress建站 wordpress电

程序员文章站 2022-05-05 17:24:59
...
server {
listen 80;
listen 443 ssl;
server_name treephp.yioio.com;

fastcgi_max_temp_file_size 0;

charset utf-8;
access_log /yioio/Logs/nginx/treephp.yioio.com.log;

location ~* ^.+\.(js|css|json|map|html|jpg|jpeg|gif|png|svg|ico)$ {
root /yioio/code/treephp;
}

location / {

root /yioio/code/treephp;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;

if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
}

以上就介绍了用于wordpress站点的nginx服务器配置PHP,包括了wordpress,nginx方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

相关标签: wordpress nginx