Why is my .htaccess not working in VPS?

Monday, January 25, 2010 2:04
Posted in category .htaccess, Linux, Tutorial

If you have a VPS or Linux server running Apache the good old fashioned way without fancy control panels, you’ll quickly have to learn some Apache tweaks.

One of the main issues we commonly run into is a non-working .htaccess file.  Apache doesn’t come with .htaccess support automatically turned on.  You’ll have to turn it on in order for .htaccess files to have an effect.  Here’s what you do:

There are two ways,

  1. Edit your httpd.conf manually using a text editor like vim, nano, vi, joe whatever you like.
  2. Edit your httpd.conf through Webmin

Since the Webmin version is more graphical, we’ll show you how to do it through Webmin.  If you’re using a text editor, just skip to the portion with the AllowOveride command.

  1. Login to your Webmin
  2. Servers>Apache Webserver
  3. Go to the “Global Configuration” tab
  4. Click on “Edit Config Files”
  5. Search for AllowOverride and .htaccess and remove the # sign in front or type “AllowOverride All”. or Search for AllowOverride None and replace with AllowOverride All
    This should fix it permanently and allow your .htaccess files to override pretty much and directive needed.

VN:F [1.8.3_1051]
Rating: 5.8/10 (4 votes cast)
VN:F [1.8.3_1051]
Rating: +1 (from 1 vote)
Why is my .htaccess not working in VPS?5.8104
http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/digg_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/reddit_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/delicious_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/blogmarks_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/google_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/myspace_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/facebook_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.sanjeevshrestha.com.np/wp-content/plugins/sociofluid/images/twitter_32.png
You can leave a response, or trackback from your own site.

One Response to “Why is my .htaccess not working in VPS?”

  1. joomla design says:

    January 26th, 2010 at 6:38 pm

    Thanks for that quick fix tip for .htaccess. I have looked everywhere for some info on properly setting up Apache.

    UN:F [1.8.3_1051]
    Rating: 5.0/5 (1 vote cast)
    UN:F [1.8.3_1051]
    Rating: +1 (from 1 vote)

Leave a Reply