下面是我nginx下wordpress站点的配置文件:
server {
listen 80;
server_name 域名;
indexindex.html index.htm index.php;
root 站点所在的目录;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .*.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*.(js|css)?$
{
expires 1h;
}
#伪静态设置路径 和日志文件路径
include /etc/nginx/rewrite/default.conf;
access_log /var/log/nginx/wordpress.log;
}这样配置好了
重启nginx:service nginx restart
博客文章链接正常,后台功能链接正常。
以上就介绍了wordpress主题下载 nginx下wordpress路径、伪静态配置,包括了wordpress主题下载方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!