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?
You really didn’t explain what locations server what exactly, but if the problem is about
alias
withtry_files
like @Seberius mentioned, then trytry changing
to
Then reload nginx