Results 1 to 5 of 5

sitemap and nginx rules

This is a discussion on sitemap and nginx rules within the General Discussion forums, part of the vBSEO SEO Plugin category; Hi all, I came with a good working configuration with nginx, with php-fpm listening on the 9000 port Code: server ...

  1. #1
    Junior Member
    Real Name
    thomas
    Join Date
    Jan 2010
    Posts
    4
    Liked
    0 times

    sitemap and nginx rules

    Hi all,

    I came with a good working configuration with nginx, with php-fpm listening on the 9000 port

    Code:
    server {	listen 80;
    	server_name mondobulldog.it;
    
    
    	rewrite ^/(.*) http://www.mondobulldog.it/$1 permanent;
    }
    
    
    
    
    server {
    	listen       80;
    	server_name  www.mondobulldog.it;
    
    
    	#charset koi8-r;
    	access_log /var/www/mb/log/access.nginx.log  main;
    	error_log /var/www/mb/log/error.nginx.log;
    	
    	location / {
    		root   /var/www/mb/html;
    		index  index.php;
    		#proxy_buffering off;
    		#proxy_max_temp_file_size 0;
    
    
    		rewrite ^/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
    		
    		try_files $uri $uri/ /vbseo.php?$args;
    	}
    
    
    	location /vbseo/(includes|resources/html|resources/xml)/ {
    		allow      127.0.0.1;
    		deny      all;
    	}
    
    
    
    
    # redirect server error pages to the static page /50x.html
    #
    	error_page   500 502 503 504  /50x.html;
    		location = /50x.html {
    		root   /usr/share/nginx/html;
    	}
    
    
    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    	location ~ /(.*\.php)$ {
    		root           html;
    		fastcgi_pass   127.0.0.1:9000;
    		fastcgi_index  index.php;
    		fastcgi_param  SCRIPT_FILENAME  /var/www/mb/html/vbseo.php$fastcgi_script_name;
    		include        fastcgi_params;
    
    
    	}
    
    
    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    	location ~ /\.ht {
    		deny  all;
    	}
    }
    The only thing not working is the vbseo_sitemap
    Pointing to http://www.mondobulldog.it/sitemap_index.xml.gz gives me a 404 error.

    Where is the problem?
    I follow the instruction supplied with vbseo

  2. #2
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Hi Thomas,

    It is working fine for me. Please check the attached screenshot: Captura de pantalla 2011-12-07 a las 14.08.19.png

    captura-de-pantalla-2011-12-07-las-14.08.19.jpg
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  3. #3
    Junior Member
    Real Name
    thomas
    Join Date
    Jan 2010
    Posts
    4
    Liked
    0 times
    I've used other rules for make it working (only for the site map)
    look at here: http://www.axivo.com/community/threa...ulletin-3.123/

  4. #4
    Junior Member
    Real Name
    thomas
    Join Date
    Jan 2010
    Posts
    4
    Liked
    0 times
    Code:
    location ^~ /sitemap_ {		location ~ ^/(sitemap_.*\.xml\.gz?)$ {
    			fastcgi_pass	127.0.0.1:9000;
    			fastcgi_param	SCRIPT_FILENAME	/var/www/mb/html/vbseo_sitemap/vbseo_getsitemap.php;
    			fastcgi_param	QUERY_STRING	sitemap=$1;
    			include		fastcgi_params_query;
    		}
    	}

  5. #5
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    I guess that the issue would have been fixed if you would have changed this rule:

    rewrite ^/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;

    to:

    rewrite ^/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /vbseo.php?vbseourl=vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;

    That may have done the trick in your case. Though I'm glad you got it working on your own.
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


Similar Threads

  1. Example of nginx (1.0.2) rewrite rules with VBSEO 3.6/Sitemap 3.0
    By swedroid in forum URL Rewrite Settings
    Replies: 0
    Last Post: 06-21-2011, 08:11 AM
  2. Problem Trying to add vbseo nginx rules
    By assassin85 in forum General Discussion
    Replies: 1
    Last Post: 12-23-2010, 07:12 PM
  3. rewrite rules on nginx in sub folder
    By bradleyw in forum General Discussion
    Replies: 20
    Last Post: 09-18-2010, 03:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •