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
Release: 2016-07-29 08:50:01
Original
1131 people have browsed it

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;
}
}
}
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template