Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ubuntu returns 500 error when .htaccess enabled

I'm currently moving a dev magento build to my live test subdomain on ubuntu and using Easy Hosting Control Panel (EHCP).

If I rename my .htaccess file to .htaccess and refresh my subdomain url, I get an internal server error 500. If I rename the .htaccess file to .htaccess.bak, and refresh, the subdomain displays my magento store fine. BUT, if I try to navigate, since the index.php isn't removed in the .htaccess file, all my links are dead unless I insert index.php between my root url and the actual page/directory I'm navigating to.

I tried over riding the /etc/apache2/sites-available/000-default and /etc/apache2/sites-available/default files to AllowOverride All:

<VirtualHost *>

    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride All
    </Directory>

    <Directory /var/www/vhosts/>
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order Allow,Deny
            Allow from All
    </Directory>

    <FilesMatch "access_log|error_log">
            Deny from All
    </FilesMatch>

    ErrorLog /var/log/apache2/error.log
    LogLevel debug
    CustomLog /var/log/apache2/access.log combineddefault

but changing that in either file, or both, and then reenabling the .htaccess file still gives me the 500 error.

anything I'm doing wrong here? Somewhere else I should be placing the mod rewrite information?

thanks!

like image 807
tigre Avatar asked Jul 26 '10 18:07

tigre


People also ask

How do I fix 500 Internal Server Error in Ubuntu?

When the webserver has no permissions to access the site files, it may throw an HTTP 500 error. The solution to this issue is to change the website file's permissions recursively .

How to fix 500 internal server error in Apache?

Hard Refresh the Page The simplest way to fix 500 internal server error in Apache is to simply refresh the page. Sometimes you may be requesting a page when the server is being restarted. In such cases, you will get 500 internal error.

What is HTTP Status 500 in Apache Tomcat?

HTTP Status 500 – Internal Server Error Description The server encountered an unexpected condition that prevented it from fulfilling the request.


2 Answers

I know this is kind of dead but for those with this issue check your /etc/apache2/mods-enabled to see if rewrite.load is there if not try to copy it from the /etc/apache2/mods-available folder that fixed the issue for me. You will also have to have the .htaccess override enabled for that

like image 132
Taylor Avatar answered Sep 19 '22 08:09

Taylor


is it rules available? maybe apache is disabled rewrite mod,you can try to enable.

type 'a2enmod rewrite' to turn on.

like image 31
mivec Avatar answered Sep 19 '22 08:09

mivec