Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED! - My .htaccess isnt working?!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jtmace
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2002
Posts: 101

PostPosted: Thu Mar 23, 2006 5:22 am    Post subject: SOLVED! - My .htaccess isnt working?! Reply with quote

I use the exact same .htaccess on a netbsd box and it works like a champ, but on my gentoo box it isnt doing anything. I run Apache2 and I'm just doing 1 simple redirect and directory protection..

Is there anything that Apache2 maybe had to be emerged with in the USE flag catagory or a module that needs to be loaded or something. I highly doubted it, but I've TRIED EVERYTHING and RTFM.


Last edited by jtmace on Fri Mar 31, 2006 9:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
quantum0726
n00b
n00b


Joined: 25 Mar 2005
Posts: 26
Location: Milwaukee, WI

PostPosted: Thu Mar 23, 2006 6:34 am    Post subject: Reply with quote

Check all the <Directory /path> declarations in your httpd.conf and if you us vhosts, your default vhost conf file as well. I can't remember if I had to change it when I first set up Apache2, but AllowOverride needs to be set to allow the .htaccess file to override the settings of that directory. I believe that in Gentoo it defaults to 'AllowOverride None'.
_________________
--Jayson

When Microsoft asks you, "Where do you want to go today?", tell them "*nix!"
Back to top
View user's profile Send private message
PMcCauley
Apprentice
Apprentice


Joined: 14 Mar 2006
Posts: 283
Location: Alberta, Canada

PostPosted: Thu Mar 23, 2006 6:41 am    Post subject: Reply with quote

Using the exact same http.conf should work assuming this line is in
Code:
AccessFileName .htaccess
this line could be in another file maybe a vhost or something. Try
Code:
cat /etc/apache2/httpd.conf | grep .htaccess
to ensure you have the correct line. As quantum0726 mentioned it is also possible you may have a conflicting line in one of the other apache configuration files. You could add the accessfilename to a vhost as well.


Patrick
Back to top
View user's profile Send private message
jtmace
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2002
Posts: 101

PostPosted: Mon Mar 27, 2006 5:36 am    Post subject: Reply with quote

PMcCauley wrote:
Using the exact same http.conf should work assuming this line is in
Code:
AccessFileName .htaccess
this line could be in another file maybe a vhost or something. Try
Code:
cat /etc/apache2/httpd.conf | grep .htaccess
to ensure you have the correct line. As quantum0726 mentioned it is also possible you may have a conflicting line in one of the other apache configuration files. You could add the accessfilename to a vhost as well.


Patrick


That line is in my .htaccess. I'll continue to hunt I guess.
Back to top
View user's profile Send private message
jiri.tyr
n00b
n00b


Joined: 08 Feb 2005
Posts: 26
Location: Czech Republic

PostPosted: Thu Mar 30, 2006 3:13 pm    Post subject: Reply with quote

That line is in my .htaccess. I'll continue to hunt I guess.[/quote]

Change in /etc/apache2/vhosts.d/00_default_vhost.conf this line:
AllowOverride None
to this:
AllowOverride All

After restart of the Apache it will be working.
Back to top
View user's profile Send private message
djcronos
n00b
n00b


Joined: 02 Oct 2004
Posts: 53
Location: San Jose, CA

PostPosted: Fri Mar 31, 2006 12:29 am    Post subject: Reply with quote

Yep, this worked. For the person who submitted this topic, please post SOLVED in the subject so others can use this in case they have the same problem you did.

I can verify that I had this problem, and this is what immediately fixed it.
_________________
Linux Lover #370481
Get Counted!
Back to top
View user's profile Send private message
jtmace
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jun 2002
Posts: 101

PostPosted: Fri Mar 31, 2006 9:30 pm    Post subject: Thanks!! Reply with quote

w00h00!!! You fixed it jiri.tyr!! Thanks alot.

Man I liked my config alot better when there werent vhosts.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum