Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache2 and .htaccess woes [Solved]
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
bfdi533
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2003
Posts: 133

PostPosted: Fri Jul 21, 2006 4:25 am    Post subject: apache2 and .htaccess woes [Solved] Reply with quote

I have a webserver that does not work properly. I am using apache-2.0.55 and have post 80, 443 setup on localhost and have 1 named virtual host.

I have a .htaccess file that does not get acted upon when the server is accessed via http/80. However, when I access it with https/443 it does get acted upon.

Any clues on which config file to check into would be very helpful.


Last edited by bfdi533 on Fri Jul 21, 2006 4:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
azuriel
Apprentice
Apprentice


Joined: 27 Feb 2005
Posts: 166

PostPosted: Fri Jul 21, 2006 5:21 am    Post subject: Reply with quote

I don't have SSL on my apache2 install, but here are the parts of my configuration relevent to .htaccess:

Code:
# httpd.conf
AccessFileName .htaccess
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
</FilesMatch>


Code:
# vhosts.d/00_default_vhost.conf
<Directory "/var/www/localhost/htdocs">
AllowOverride All
</Directory>


I can't imagine SSL adding that much more complexity to using a .htaccess file. Then again, if you have root and can edit httpd.conf and vhosts.d/*, then you shouldn't be using .htaccess at all (like it says in the Apache documentation).
_________________
Adopt an unanswered post
TJGames.org

The folly of mistaking a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us. -Valery
Back to top
View user's profile Send private message
bfdi533
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2003
Posts: 133

PostPosted: Fri Jul 21, 2006 4:34 pm    Post subject: Reply with quote

First, I wanted to say thanks for replying.

azuriel wrote:

Code:
# vhosts.d/00_default_vhost.conf
<Directory "/var/www/localhost/htdocs">
AllowOverride All
</Directory>



This was the missing part. Somehow this was switched to "AllowOverride None" thus keeping these from being used in the .htaccess file. Maybe a recent etc-update clobbered this setting.

azuriel wrote:

I can't imagine SSL adding that much more complexity to using a .htaccess file. Then again, if you have root and can edit httpd.conf and vhosts.d/*, then you shouldn't be using .htaccess at all (like it says in the Apache documentation).


Yes, of course I have root access and can edit these file but I have searched for this and cannot find it. I would be grateful if you could point me to a url reference on this.
Back to top
View user's profile Send private message
azuriel
Apprentice
Apprentice


Joined: 27 Feb 2005
Posts: 166

PostPosted: Fri Jul 21, 2006 4:47 pm    Post subject: Reply with quote

A .htaccess file is the same as what you put in a <Directory></Directory> block, where the Directory is what folder the .htaccess file is stored in.

Check out http://httpd.apache.org/docs/1.3/howto/htaccess.html#when, where they say the same thing.
_________________
Adopt an unanswered post
TJGames.org

The folly of mistaking a torrent of verbiage for a spring of capital truths, and oneself for an oracle, is inborn in us. -Valery
Back to top
View user's profile Send private message
bfdi533
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2003
Posts: 133

PostPosted: Fri Jul 21, 2006 6:20 pm    Post subject: Reply with quote

Thank you very much for the referenced link; I have read it and understand the issue. I will change over the ones that need this to the httpd.conf file.
Back to top
View user's profile Send private message
sleepingsun
Guru
Guru


Joined: 03 May 2006
Posts: 477
Location: Bosnia

PostPosted: Wed Nov 08, 2006 11:11 pm    Post subject: Reply with quote

Thanks its also helps me !
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