Home >Backend Development >PHP Tutorial >nginx server configuration for wordpress site PHP wordpress system wordpress website building wordpress electricity

nginx server configuration for wordpress site PHP wordpress system wordpress website building wordpress electricity

WBOY
WBOYOriginal
2016-07-29 08:50:011141browse

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教程有兴趣的朋友有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn