Nginx xml sitemap load like html in blank page
-
Hi to all i try to create the sitemap xml with yoast but when i go to the page http://ntacalabria.it/sitemap_index.xml i see a blank page. But if i see the source code i can see the html sitemap index generated and if i use the url http://www.ntacalabria.it/index.php?sitemap=1?sitemap=1 i have also the blank page but the source code see the xml index generated.
Thi si my configuration file for my site..
server { listen *:80; server_name www.ntacalabria.it ntacalabria.it; access_log /var/log/nginx/wordpress.access.log; error_log /var/log/nginx/wordpress.error.log; root /home/ftp/wordpress; index index.html index.htm index.php; include /etc/nginx.wp/restrictions.conf; include /etc/nginx.wp/wordpress.conf; rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last; rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last; location ~ [^/]\.php(/|$) { # Zero-day exploit defense. # http://forum.nginx.org/read.php?2,88845,page=3 # Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi. # Comment the 'try_files' line out if you set up php-fpm/php-fcgi on another machine. And then cross your fingers that you won't get hacked. try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index index.php; include fcgi.conf; fastcgi_pass unix:/var/run/php-fcgi-wordpress-php-fcgi-0.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }Thank you
Ps the sitemap was generated i can’t see it only (and google)
The topic ‘Nginx xml sitemap load like html in blank page’ is closed to new replies.