1

I need to add Wordpress blog to my Flask site. I tried to deploy blog to working nginx config in this way:

server {
listen 80;
server_name localhost;

location / {
    uwsgi_pass unix:/tmp/site.sock;
    include uwsgi_params;
}

location = /blog/ {
   alias /var/www/blog/;
   index index.php;
   try_files $uri $uri/ /blog/index.php?q=$uri?$args;
}


location ~ /blog/.+\.php$ {
   root /var/www/;
   include /etc/nginx/fastcgi_params;
   fastcgi_pass 127.0.0.1:9000;
}

# path for static files
location  /static/ {
    alias /var/www/site/static/;
    autoindex on;
    expires max;
}
}

But wordpress shows me only 404 page(not standart, this page was made expessially for blog and included to wordpress page) Otherwise, I checked, that connection to database created and wp_config works. May be I missed some setting in WP or nginx config?

4

1 回答 1

0

你真的没有解释什么位置服务器到底是什么,但如果问题是像@Seberius提到aliastry_files那样,然后尝试改变

alias /var/www/blog/;

root /var/www/;

然后重新加载nginx

于 2013-10-20T09:57:50.077 回答