Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.5k views
in Q2A Core by
edited
i´m using nginx in my server but

 

i can´t acess to : mysite.com/sitemap.xml

i´m having a error 404
 

what i need modify in my nginx conf to get access to my latest updated sitemap?

 

please help, thanks
Q2A version: 1.5

1 Answer

0 votes
by
I've no problem with nginx, sitemap.xml works fine.

My code in nginx config:

rewrite ^/(.+)?$ /index.php?qa-rewrite=$1 last;

this means that ALL site urls go through index.php, if you still get an 404 error, then maybe problem with sitemap plugin/module?
by
edited by

Thanks BubkaGob for your response i´ve added:

rewrite ^/(.+)?$ /index.php?qa-rewrite=$1 last;

 

to my nginx conf, now sitemap is working, but my website now don´t have images.

just text.  :/

where is my problem :?

 

 

by
You can use the following rule for those files that are not on the server:

if (!-e $doc_root$fastcgi_script_name) {
    rewrite ^/(.+)?$ /index.php?qa-rewrite=$1 last;
}

$doc_root & $fastcgi_script_name - must be constants by default in fast-cgi config OR use exclude for images directory

location !~ ^/images/ {
    rewrite ^/(.+)?$ /index.php?qa-rewrite=$1 last;
}
...