Wednesday, 3 December 2014

Problem with 2 config files for same virtual host

Error 500 in .htaccess: php_value not allowed here in Ubuntu 14.4TLS

I added the following 2 lines in my .htaccess file. Suddenly, my site started showing HTTP error 500 Internal Server Error. php_value max_input_vars 2000 php_value post_max_size 20M

After browsing through internet, I specified AllowOverride All to the VirtualHost I was using for the site. Actual setting specifically for this purpose is AllowOverride FileInfo. Since the distribution of LINUX that I was using is Ubuntu 14.4 TLS, the apache build had 2 directories namely-
1. conf-available 2. sites-available Both had .conf files for my VirtualHost folder; my mistake. I unlinked the .conf file in the conf-available folder. Executed the following commands. sudo a2disconf ..../conf-enabled/vhost_config_80.conf sudo unlink ..../conf-enabled/vhost_http_config_80.conf sudo a2dissite ..../sites-available/vhost_http_config_80.conf sudo a2ensite ..../sites-available/vhost_http_config_80.conf sudo /etc/init.d/apache2 stop sudo /etc/init.d/apache2 start This solved the problem. The site was up and 500 Internal Server Error was solved. Moral of the story: Never keep 2 configuration files for the same purpose on a web server.


0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home