WordPress.org

Ready to get started?Download WordPress

Forums

BulletProof Security
[resolved] Internal Server Error after installation (27 posts)

  1. progresstination
    Member
    Posted 1 year ago #

    after installation (using the automagic buttons and making suggested backups) I can log on to my page and see the homepage but every link is broken and I get:
    "
    Internal Server Error
    ...
    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
    "
    so in my panic I deleted the plugin (it's reinstalled now though) and deleted the htaccess-file, but still my site isn't working anymore. please help, as I can't figure out the problem, although I guess it's something with the permalinks.

    Website Root Folder: http://eva.progresstination.net/portfolio
    Document Root Path: /home/progr468/public_html/eva
    Server / Website IP Address: 69.90.163.150
    Host by Address: hp62.hostpapa.com
    DNS Name Server: ns2.hostpapa.com
    Public IP / Your Computer IP Address: 90.30.125.80
    Server Type: Apache
    Operating System: Linux
    Server API: cgi-fcgi - Your Host Server is using CGI.

    WHAT'S TO DO?

    http://wordpress.org/extend/plugins/bulletproof-security/

  2. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Ok i see that this is a subdomain website with a subfolder site installation of WordPress.

    The subdomain site appears to be setup correctly and I can see that it loads fine using the progresstination.net/eva/ URL.

    What type of website is the subdomain website? I see that the index file is an index.html file.
    You will probably need to add an HTML .htaccess file manually for this site. You would download the secure.htaccess file from the bulletproof security plugin folder /bulletproof-security/admin/htaccess/secure.htaccess and would change all instances of index.php to index.html and change this below also and then upload the modified HTML .htaccess file and upload it to to your /eva folder and of course rename it from secure.htaccess to just .htaccess. Also the RewriteBase for your subdomain site is going to be RewriteBase / since it is a root website:

    # DIRECTORY INDEX FORCE INDEX.HTML
    # Use index.php as default directory index file
    # index.html will be ignored will not load.
    DirectoryIndex index.php index.html /index.html

    Is the WordPress subfolder site in this folder /eva/portfolio?

    Is AutoMagic creating the RewriteBase correctly for this subfolder site - it should be RewriteBase /portfolio/ ?

    You can check this by going to the Edit/Upload/Download page and clicking on the "Your Current Root htaccess File" tab.

    It appears that you are using /%postname%/ for your Custom Permalink Structure so that looks fine.

    Are both BulletProof Modes being activated successfully?

  3. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    hmm ok i see the problem.

    if i go to these URLs without using the subdomain prefix eva i see 404 errors so it appears that there is a problem with where the actual subfolder site is located/installed.

    progresstination.net/portfolio/category/playground/
    progresstination.net/portfolio/portfolio-page/

  4. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    This internal URL works fine so yep you have some kind of issue going on with your site architecture/site structure. unless of course this is another site???

    progresstination.net/category/works/

  5. progresstination
    Member
    Posted 1 year ago #

    uhhh, I'm so glad you responded... so I try to answer your questions:

    First, everything (wordpress) is in the portfolio-folder, and I think its using index.php, see http://www.progresstination.net/exchange/screenshotFTP.png
    My current roots htaccess file reads:
    [
    # BULLETPROOF .47.D >>>>>>> DEFAULT .HTACCESS
    # If you edit the line of code above you will see error messages on the BPS Security Status page
    # WARNING!!! THE default.htaccess FILE DOES NOT PROTECT YOUR WEBSITE AGAINST HACKERS
    # This is a standard generic htaccess file that does NOT provide any website security
    # The DEFAULT .HTACCESS file should be used for testing and troubleshooting purposes only
    # 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
    ]
    Can/should I make any changes there?

    I've manually uploaded the htaccess file, after have added a "#" before "Options -Indexes", as it was adviced in a different thread about this topic. didn't help though.

    As I have re-installed it but not activated anything, no Modes being activated right now I guess.

  6. progresstination
    Member
    Posted 1 year ago #

    MISUNDERSTANDING:
    progresstination.net is an other wordpress site of mine. I have no problems there so far.

    the problem only affects my page: eva.progresstination.net/portfolio

    on this page everyhting was working until I tried to use the plugin

  7. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Hostpapa allows the Options directive so yeah you do not need to comment that out.

    Ok so your screenshot shows that the portfolio site is a subfolder site installed under a subdomain site. subdomain sites are root websites because of the way DNS A Records work.

    So the RewriteBase for the portfolio site should be this RewriteBase /portfolio/ but the .htaccess file code you posted above shows a root website RewriteBase. I guess AutoMagic is not seeing this as a subfolder site for some reason.

    Manually change your .htaccess code using the BPS built-in .htaccess file editor and change your RewriteBase and also change your RewriteRules to...

    RewriteRule . /portfolio/index.php [L]

    If everything is working correctly with your URL's using the Default .htaccess file then you will need to make these same manual file edits when you activate BulletProof Mode for your root folder.

    or since BPS looks at your WordPress site settings that you have under Settings >>> General >>> WordPress Address (URL) and Site Address (URL) then probably the better thing to do would be to set these correctly.

    I believe those URL paths would be, but i am not 100% sure about this.
    eva.progresstination.net/portfolio

    What settings do you currently have under WordPress Address (URL) and Site Address (URL)?

  8. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Or maybe the correct URL paths would be...

    progresstination.net/eva/portfolio

  9. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Well the real issue is your Site Url settings are not correct and you are now seeing this because you are using an .htaccess file that is reflecting that existing problem.

  10. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    The BPS Default .htaccess file is a standard WordPress .htaccess file so even if you use the standard WordPress .htaccess file then you are still going to have this issue/problem.

    Be very careful about changing your URL settings to correct settings otherwise you will have to use phpMyAdmin to change the URL's in your
    WordPress Database.

    http://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database

  11. progresstination
    Member
    Posted 1 year ago #

    just to make this clear:
    I have a subdomain of progresstination.net called:
    eva.progresstination.net (where my old flash-portfolio is visible)

    i was working on my new wordpress-portfolio, which I installed under
    eva.progresstination.net/portfolio. [after finishing this site I meant to simply redirect from eva.progresstination.net (my old subdomain-portfolio) to eva.progresstination.net/portfolio (new one).]

    alright: WordPress Address (URL) and Site Address (URL) both say
    http://eva.progresstination.net/portfolio
    problably no need to enter same URL twice

    ok, I'll try to make the changes to htaccess, reads now:
    [
    # BULLETPROOF .47.6 >>>>>>> SECURE .HTACCESS
    (...)
    # DENY ACCESS TO PROTECTED SERVER FILES - .htaccess, .htpasswd and all file names starting with dot
    RedirectMatch 403 /\..*$

    RewriteEngine On
    RewriteBase /portfolio/
    RewriteRule ^wp-admin/includes/ - [F,L]
    RewriteRule !^wp-includes/ - [S=3]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
    RewriteRule ^wp-includes/theme-compat/ - [F,L]

    RewriteEngine On
    # RewriteBase /
    RewriteBase /portfolio/
    # RewriteRule ^index\.php$ - [L]
    RewriteRule . /portfolio/index.php [L]
    ]

    RESULT:
    no access to dashboard, homepage gone too!
    http://eva.progresstination.net/portfolio/wp-admin/

    so I temporalily deleted the htaccess, logged in my site again, what do I have to do before uploading manually changed htaccess?

  12. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Let me install a subfolder WordPress installation under one of my subdomain websites and then i will be able to tell you what the correct URL settings are. Give me about 15 minutes to do this and i will post back here. thanks.

  13. progresstination
    Member
    Posted 1 year ago #

    uhhh, seems you're right: something's wrong with my URLs, cos after re-entering
    "http://eva.progresstination.net/portfolio"
    as my WordPress Address (URL) it tells me:
    [
    The Site address you entered did not appear to be a valid URL. Please enter a valid URL.
    ]

    I'm starting to feel a bit desperate.
    i installed wordpress via hostpapa and they sent me this:
    [
    A new installation of WordPress 3.4.2 has been completed. The details of the installation are shown below:
    Path : /home/progr468/public_html/eva/portfolio
    URL : http://eva.progresstination.net/portfolio
    ]
    I never manually changed my WordPress Address (URL)...

  14. progresstination
    Member
    Posted 1 year ago #

    man, you are just great and awfully helpful. thank you so much!!!

  15. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    No problem and actually i have been meaning to check out what happens with subfolder sites installed under subdomain sites to no biggee. ;)

    it is possible that there is some kind of "hinky" issue going on with aliasing so once i find out for sure what the correct URL's are then that is a solid starting point. will post back here in a minute - still setting up the site.

  16. progresstination
    Member
    Posted 1 year ago #

    PAGE WORKS AGAIN after having "insisted" a few times to enter:
    http://eva.progresstination.net/portfolio/(!WITH a "/") at the end
    in both fields:
    WordPress Address (URL)
    &
    Site Address (URL)

    (BPS deactivated & htaccess file deleted)

    so I guess no BPS for subdomain-subfolder-fools like me?!

  17. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    LOL Well a subdomain with subfolder site setup is just more complex so i imagine that most folks do not even know they can do something like this. ;) Almost done with the manual WordPress installation on the test site.

  18. progresstination
    Member
    Posted 1 year ago #

    I'll attend to some other business concerning some food. however, thanks for putting me on the right track and for your fast and engaged way of helping.

    Let me know if you stumble across some useful information during your quest through sub.domain/subfolder-hell...

    good night and good luck, eva

  19. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    I ran into some whacky problems with installing a DB under one of subdomain sites - could not get the DB to connect at all on that subdomain subfolder site and could not log into the DB with phpMyAdmin either? Strangest problem i have ever seen. I checked with my Host and they did not see anything wrong, but obviously something is wrong. Anyway i threw in the towel on that experiment. I looked around the GoogleHood and i do not see info about this anywhere so not sure what to tell you at this point.

  20. progresstination
    Member
    Posted 1 year ago #

    Strangest problem i have ever seen

    ...makes me smile the sad evil way man...
    I knew something isn't quite right after once trying to move my wordpress-page, but leaving the db at it's place(localhost). although setting new paths to wordpress, database etc. i lost access to wordpress-admin-page entirely. i think the only reason why it works in the first place is that I've installed wordpress via a software my host is providing (softaculous). I simply choose my subdomain, add a foldername that doesn't exist (portfolio) and a db-name, the rest is done by the software...
    now I'm getting afraid of future problems...guess my ignorance is paying off now, hehe

    have a good day with problems that are solvable! yours thankfully, eva

  21. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Ok got the MySQL DB problem figured out and it was a very strange one afterall. For whatever reason the automated DB creator on my Host did not like the #14 or that i was creating a 14th new DB. When i created a 15th new DB with exactly the same setup/settings it worked fine. Being a coder I imagine that there is some coding check somewhere that just did not like a combination of things or maybe just the #14 is unlucky when creating MySQL DB's. LOL

    Ok so yep creating a subdirectory site under a subdomain is exactly the same as any other scenario and there is nothing special about it. Everything worked perfectly fine and as expected.

    Under Settings >>> General
    WordPress Address (URL): http://sub.example.com/private
    Site Address (URL): http://sub.example.com/private

    Permalink: /%postname%/

    WordPress generates this .htaccess code

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

    BPS generates this .htaccess code (only posting a snippet)

    RewriteEngine On
    RewriteBase /private/
    RewriteRule ^wp-admin/includes/ - [F,L]
    RewriteRule !^wp-includes/ - [S=3]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
    RewriteRule ^wp-includes/theme-compat/ - [F,L]
    
    RewriteEngine On
    RewriteBase /private/
    RewriteRule ^index\.php$ - [L]
    ...
    ...
    ...
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /private/index.php [L]
  22. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    i was working on my new wordpress-portfolio, which I installed under
    eva.progresstination.net/portfolio. after finishing this site I meant to simply redirect from eva.progresstination.net (my old subdomain-portfolio) to eva.progresstination.net/portfolio (new one).

    I think this above is where the problem is going to be. Are you doing any kind of additional redirect from somewhere else? ie your Control panel or another .htaccess file or in some php coding?

  23. progresstination
    Member
    Posted 1 year ago #

    ha(rdcore)!
    you picked up the towel!
    stuff like your db-bug with #14 is the reason why i find coding just as irritating as real life...

    so BPS is working for you?
    from what you where posting, I;ve the same setup (wordpress .htaccess file)

    my BPS .htaccess file (after I made the changes which resulted in me not having access to my dashboard anymore - which is probably because I haven't done any automagic buttong klicking before?) said pretty much the same as yours, just this:

    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} (wp-comments-post\.php)
    #RewriteCond %{HTTP_REFERER} !^.*demo5.local.* [OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule .* - [F]

    seems to be a bit different.

    REDIRECTING:
    since today (a few hours ago) I redirect from
    eva.progresstination.net TO
    eva.progresstination.net/portfolio
    but did wasn't the case when the problem with BPS occured!!! There were no redirections at that time.

    You think I should try the plugIn again?

  24. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Yep coding can sometimes be an adventure and not just a job. LOL

    yep BPS is working fine on that subdirectory/subdomain site here - forum.ait-pro.com/private if you want to check it out. I only created one test Post and it worked fine. All the Default WP Pages that come with a standard WP installation are working fine too.

    Are you clicking the AutoMagic buttons before Activating BulletProof Modes? The code you are showing above is what "ships" with BPS and is just a placeholder file. When you use AutoMagic it creates new Master .htaccess files that are specific for your website. ie your valid info. and activating BulletProof Modes just copies and renames the Master files and puts them where they are supposed to go.

    It's up to you whether or not you want to use BPS or not. ;) Just wanted to get my findings posted as an official record since i was curious about this myself. And if anyone ever asks this question again. ;) BPS works fine installed on a subdirectory site installed under a subdomain site. Thanks.

  25. progresstination
    Member
    Posted 1 year ago #

    cool, I'll give it an other go, maybe I just messed up something stupid during the installing process. I've your code snippet to compare with the result at my side. (thanks for posting your findings during the process!!!)

    just a last question, if you don't mind (because I'm not familiar with how BPS exactly works):
    I also have a wordpresspage running on my main domain (progresstination.net). If I'd install BPS there, would that have any effect (like some kind of protection) on my subdomains? Thank you!

  26. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    htaccess files work in a heirarchical way. If an .htaccess exists in a folder then it apply those security rules recursively to all subfolders UNLESS a subfolder has its own .htaccess file. then that subfolder will follow the rules in its own .htaccess file.

    /.htaccess
    /websiteA/.htaccess
    /websiteB/.htaccess
    /websiteB/websiteC/.htaccess

    website C will follow the .htaccess rules in the .htaccess file that exists in the websiteC folder and not the .htaccess rules in the .htaccess file that exists in the websiteB folder.

    So if you have an .htaccess file in the main domain then it will try to apply those security rules recursively to all subfolders. If the subfolders or other sites have their own .htaccess files then they will follow the rules in their .htaccess files.

    That is why when you have a mix of site types you would also want to create/add an HTML version or a php version of the secure.htaccess file and upload it to those sites/folders. All of your sites will be compartmentalized and have their own .htaccess files / security rules per directory.

    Your subdomain sites are in their own folders so the hiearchical methods explained above would be the same since the subdomain sites have separate directories/folders.

  27. progresstination
    Member
    Posted 1 year ago #

    alright, got it! you helped (and taught) me a lot man. thank you very much! eva

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.