WordPress.org

Forums

Visitor Maps Extended Referer Field
[resolved] Internal Server Error (16 posts)

  1. demon11c
    Member
    Posted 2 years ago #

    Hi there

    I think my problem is related to others that have posted, but Im not sure. I have the latest version of WordPress (3.5.1) and Visitor Maps Extended Referer Field (1.2.2).

    Basically, when I try to ban an IP address by clicking the button next to the IP address, my site goes down giving "Internal Server Error" message. Ive narrowed the problem down to the .htaccess file. When I ban an IP, it adds the following code:

    # BEGIN Visitor Maps Extended
    # BEGIN banned ips
    <Limit GET POST>
    order allow,deny
    deny from 91.207.4.186
    allow from all
    </Limit>
    # END banned ips
    # END Visitor Maps Extended

    I can simply edit the .htaccess file (no need to uninstall the plugin) and remove the code above to fix the issue. But of course, the plugin does not work.

    Any idea how to fix this? This is a great idea for a plugin and would love to get it working.

    Thanks

    http://wordpress.org/extend/plugins/visitor-maps-extended-referer-field/

  2. President McCheese
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    Sorry you're having trouble with the plugin.

    Have you tested this on another website on the same server?

    There may be a conflict with another script which uses htaccess.

    Try setting the file permissions for htaccess to 0644 instead of removing the Visitor Maps Extended code.

  3. demon11c
    Member
    Posted 2 years ago #

    Heh, it's working and I dont even know what I did. Very strange.
    Anyway, thanks for your reply. Great plugin.

  4. demon11c
    Member
    Posted 2 years ago #

    ok, weird. The plugin seems to be working. I can ban an IP or site without the site going down and the banned IPs are logged and remain there. All good. The thing is, wanted to have a look at the .htaccess file again, but can't find the entries!
    It should be the .htaccess file under the root directory of the site, right? Or is it somewhere else?

  5. demon11c
    Member
    Posted 2 years ago #

    I just did a test from my work PC. I banned the IP, but I can still access. Any idea?

  6. President McCheese
    Member
    Plugin Author

    Posted 2 years ago #

    If the IP isn't added to htaccess, it won't be blocked. Reinstall the plugin. We need to figure out why your server returns an error.

  7. demon11c
    Member
    Posted 2 years ago #

    Ok, please ignore my last few comments. I retardedly did a chown instead of a chmod when trying to apply 0644 to .htaccess which is why nothing was writing to it. I have now fixed the permissions and Im back to the original problem. .htaccess is being edited, but my site goes down.

    I noticed this in the comments in the Visitor Maps Extended section of .htacces:

    Uncomment 'Options +FollowSymlinks' if your server returns a
    '500 Internal Server' error.

    I tried to uncomment that option, but it didnt do anything.

    Any other suggestiongs?

  8. demon11c
    Member
    Posted 2 years ago #

    btw, my httpd.conf has FollowSymlinks configured:

    <Directory />
        Options FollowSymLinks
        AllowOverride FileInfo
    </Directory>
  9. demon11c
    Member
    Posted 2 years ago #

    Sorry for all the posts. Im just posting as I find something.
    It looks like referer bans are working. The error happens with the IP ban.

    Here is what it looks like normally, which takes the site down:

    # BEGIN banned ips
    <Limit GET POST>
    order allow,deny
    deny from 46.118.119.252
    allow from all
    </Limit>
    # END banned ips

    The server will only come back if I comment out everything within the Limit code:

    # BEGIN banned ips
    <Limit GET POST>
    #order allow,deny
    #deny from 46.118.119.252
    #allow from all
    </Limit>
    # END banned ips

    All 3 need to be commented out for the site to come back.

  10. demon11c
    Member
    Posted 2 years ago #

    If I use the last config above (commenting out the 3 lines within Limit) to make the site work and I then uncomment "Options +FollowSymlinks", the site goes down again.

  11. President McCheese
    Member
    Plugin Author

    Posted 2 years ago #

    Have you tested this plugin on a clean WordPress install on the same server?

    I don't know what the rest of your htaccess file looks like, so I can't say if there are other plugins or scripts conflicting with this one.

    'Options +FollowSymlinks' would be for mod_rewrite and not for ip banning.

    Try removing all of the banned ips code except the following line -
    deny from 46.118.119.252

    chmod to 0755.

    Check your error logs for specific error messages.

    Let me know how it goes.

  12. demon11c
    Member
    Posted 2 years ago #

    The .htaccess file that is being edited is at the root of the site in question. eg: /var/www/sitename/.htaccess.
    The other two sites I have running on the same server are not impacted by this. Ill try installing at testing on one of the other sites a bit later when I have some time.

    Here's the beginning of my .htaccess. After this, Visitor Maps Extended starts and there is nothing else:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    I chmod'd to 0755. No change
    I removed all banned IPs code except for one of the IPs. No change.

  13. President McCheese
    Member
    Plugin Author

    Posted 2 years ago #

    Be sure to end the WordPress rules.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Please post the message you receive from your error log.

  14. demon11c
    Member
    Posted 2 years ago #

    Found it! Good call on the httpd error logs (should have gone there first). Saw this:

    .htaccess: DirectoryIndex not allowed here

    which led me here:
    http://drupal.org/node/10133

    And I added a <Directory> in my httpd.conf for my site and changed:

    AllowOverride None
    to
    AllowOverride All

    Et Voila! Working!

  15. demon11c
    Member
    Posted 2 years ago #

    Thanks your help!

  16. President McCheese
    Member
    Plugin Author

    Posted 2 years ago #

    I should have asked you to check your error logs first, but I didn't think of it until later. Thanks for posting your solution.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Visitor Maps Extended Referer Field
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.