Results 1 to 3 of 3

403 forbidden error when trying to access sitemap

This is a discussion on 403 forbidden error when trying to access sitemap within the Troubleshooting forums, part of the vBSEO Google/Yahoo Sitemap category; Everything was working fine until I rebuilt easyapache. I've even disabled modsec but nothing fixes it. modsec_audit.log doesn't describe the ...

  1. #1
    Member
    Real Name
    Aaron Dev
    Join Date
    Mar 2011
    Posts
    72
    Liked
    2 times

    Exclamation 403 forbidden error when trying to access sitemap

    Everything was working fine until I rebuilt easyapache. I've even disabled modsec but nothing fixes it. modsec_audit.log doesn't describe the error, only says access to the sitemap isn't allowed under my present server configuration. I've tried making an exclude for the folder in modsec but that didn't work either. I'm wondering if it could be mod_userdir protection, but I've always had that enabled and its never caused any problems before now. Chmodding hasn't done a thing.

    http://www.studioleaks.info/forums/v...p_index.xml.gz

    Here's my Apache config:
    './configure' '--disable-cgi' '--disable-fileinfo' '--disable-pdo' '--disable-phar' '--disable-posix' '--enable-ftp' '--enable-libxml' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mysql' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pic' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'

    core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_filter mod_log_config mod_logio mod_env mod_expires mod_headers mod_unique_id mod_setenvif mod_proxy mod_proxy_connect mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_proxy_ajp mod_proxy_balancer mod_ssl prefork http_core mod_mime mod_status mod_autoindex mod_asis mod_info mod_suexec mod_cgi mod_negotiation mod_dir mod_actions mod_userdir mod_alias mod_rewrite mod_so mod_bwlimited mod_php5 mod_security2
    And my .htaccess file from my forum root:
    RewriteEngine On

    RewriteBase /forums/

    RewriteCond %{HTTP_HOST} !^www\.studioleaks\.info
    RewriteRule (.*) http://www.studioleaks.info/forums/$1 [L,R=301]

    RewriteCond %{REQUEST_URI} !(administratorcontrolpanel/|moderatorcontrolpanel/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(adiminstratorcontrolpanel|moderatorcontrolpanel|c lientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    Note that admincp and modcp have been changed since the folders have different names.

    And here's the exact error message from my log:
    client denied by server configuration: /home/username/public_html/forums/vbseo_sitemap/data/sitemap_index.xml.gz

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    The vbseo htaccess file in the data folder does this.

    The file should NEVER be accessed this way.

    http://www.studioleaks.info/forums/sitemap_index.xml.gz is the correct url to use.

    But your forum htaccess file is incorrect. Please use the htaccess file provided in the download package. order DOES matter and where you have the sitemap rule is wrong.

  3. #3
    Member
    Real Name
    Aaron Dev
    Join Date
    Mar 2011
    Posts
    72
    Liked
    2 times
    Brian, thanks so much. .htaccess now reads as the following, and my sitemap downloads correctly:
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.

    RewriteEngine On

    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)

    RewriteBase /forums/

    RewriteCond %{HTTP_HOST} !^www\.studioleaks\.info
    RewriteRule (.*) http://www.studioleaks.info/forums/$1 [L,R=301]

    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_URI} !(administratorcontrolpanel/|moderatorcontrolpanel/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(adiminstratorcontrolpanel|moderatorcontrolpanel|c lientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]

Similar Threads

  1. Replies: 4
    Last Post: 04-05-2011, 06:54 AM
  2. Replies: 2
    Last Post: 03-02-2011, 05:14 PM
  3. vBulletin 4.x We encountered an error while trying to access your Sitemap
    By daveaite in forum Troubleshooting
    Replies: 1
    Last Post: 02-20-2011, 11:54 PM
  4. 403 Forbidden error......
    By newbuck in forum Troubleshooting
    Replies: 14
    Last Post: 04-01-2008, 12:23 PM
  5. We encountered an error while trying to access your Sitemap.
    By xboxlive42626 in forum Bug Reporting
    Replies: 2
    Last Post: 11-24-2006, 12:07 PM

Posting Permissions

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