Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

apache2 vhosts getting 403 forbidden

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
adpowers
n00b
n00b
Posts: 25
Joined: Tue Jan 14, 2003 8:05 pm
Contact:
Contact adpowers
Website

apache2 vhosts getting 403 forbidden

  • Quote

Post by adpowers » Wed Dec 17, 2003 9:46 pm

Hello all. I have a few day old thread in here about some problems with Apache 1.3.29. Since then, I decided to stop trying to swim against the tide and I upgraded to Apache2 with a fresh config.

The server worked just fine with minimal changes to the configuration settings, but things screwed up when I set up vhosts. It works fine again if I remove the vhosts. Here is my vhosts files:

Code: Select all

NameVirtualHost *
<VirtualHost *>
 DocumentRoot /home/andrew_hitchcock/www/iis
 ServerName microshaft.com
 ServerAlias microshaft.com *.microshaft.com
 DirectoryIndex index.html
 SuExecUserGroup andrew_hitchcock users

 <Directory "/home/andrew_hitchcock/www/iis">
  Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews
  AllowOverride none
  Order allow,deny
  Allow from all
 </Directory>
</VirtualHost> 
I currently have the permissions for that folder (~/www/iis) set to 700, is this correct? Every time I try to connect to the server, I get 403 forbidden. Note, the server-status command works normally, but when I add the vhost, it stops working as well.

Again, any help would be greatly appreciated. Thanks,
Andrew
Top
npmccallum
Retired Dev
Retired Dev
User avatar
Posts: 306
Joined: Fri May 09, 2003 6:00 pm
Location: Lexington, KY

Re: apache2 vhosts getting 403 forbidden

  • Quote

Post by npmccallum » Thu Dec 25, 2003 5:25 am

adpowers wrote:Hello all. I have a few day old thread in here about some problems with Apache 1.3.29. Since then, I decided to stop trying to swim against the tide and I upgraded to Apache2 with a fresh config.

The server worked just fine with minimal changes to the configuration settings, but things screwed up when I set up vhosts. It works fine again if I remove the vhosts. Here is my vhosts files:

Code: Select all

NameVirtualHost *
<VirtualHost *>
 DocumentRoot /home/andrew_hitchcock/www/iis
 ServerName microshaft.com
 ServerAlias microshaft.com *.microshaft.com
 DirectoryIndex index.html
 SuExecUserGroup andrew_hitchcock users

 <Directory "/home/andrew_hitchcock/www/iis">
  Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews
  AllowOverride none
  Order allow,deny
  Allow from all
 </Directory>
</VirtualHost> 
I currently have the permissions for that folder (~/www/iis) set to 700, is this correct? Every time I try to connect to the server, I get 403 forbidden. Note, the server-status command works normally, but when I add the vhost, it stops working as well.

Again, any help would be greatly appreciated. Thanks,
Andrew
I too am having this problem. When I disable my vhost, the server runs fine. When I enable the vhost, 403 on both the vhost and any other access. Here is my vhost.conf file:

Code: Select all

################# gentoo.natemccallum.com
NameVirtualHost *
<VirtualHost *>
   ServerName gentoo.natemccallum.com
#   ServerPath /etc/apache2
   DocumentRoot /var/www/gentoo.natemccallum.com/htdocs/
</VirtualHost>
All my permissions are set right (world readable). If you disable the vhost, the server works. Very strange... Have you found any solution?
GLIS your way to gentoo...
Top
adpowers
n00b
n00b
Posts: 25
Joined: Tue Jan 14, 2003 8:05 pm
Contact:
Contact adpowers
Website

  • Quote

Post by adpowers » Thu Dec 25, 2003 5:46 am

No, unfortunately, I haven't figured it out yet. However, I haven't been trying very much the last few days. My friend suggested I just install from the Apache souces (not using ebuilds). I would love to hear of anyone that has had success.

Andrew

PS: Thanks for the bump :).
Top
npmccallum
Retired Dev
Retired Dev
User avatar
Posts: 306
Joined: Fri May 09, 2003 6:00 pm
Location: Lexington, KY

  • Quote

Post by npmccallum » Thu Dec 25, 2003 6:05 am

Have you tried posting it to the gentoo-user mailing list?
GLIS your way to gentoo...
Top
adpowers
n00b
n00b
Posts: 25
Joined: Tue Jan 14, 2003 8:05 pm
Contact:
Contact adpowers
Website

  • Quote

Post by adpowers » Thu Dec 25, 2003 6:54 am

No, I am not subscribed. However, if you send it in, I would love to hear the results.
Top
Beerke
n00b
n00b
Posts: 53
Joined: Sat Apr 19, 2003 8:30 am
Contact:
Contact Beerke
Website

  • Quote

Post by Beerke » Fri Dec 26, 2003 10:27 am

I got the following settings of my vhosts, maybe they are of help to you
NameVirtualHost *

<VirtualHost *:*>
DocumentRoot /var/www/www.beerke.nl/htdocs
ServerName www.beerke.nl
</VirtualHost>

<Directory "/var/www/www.beerke.nl/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Top
adpowers
n00b
n00b
Posts: 25
Joined: Tue Jan 14, 2003 8:05 pm
Contact:
Contact adpowers
Website

  • Quote

Post by adpowers » Fri Dec 26, 2003 9:22 pm

Okay, I just tried that (modifying it to use my paths) and it didn't work.

BTW, here are my permissions for the www directory, is this correct?

Code: Select all

drwxr--r--    3 andrew_hitchcock users         104 Dec 23 03:59 www

Thanks,
Andrew
Top
jaxn
n00b
n00b
Posts: 2
Joined: Fri Apr 18, 2003 8:15 pm
Contact:
Contact jaxn
Website

  • Quote

Post by jaxn » Sun Feb 01, 2004 4:51 am

I am getting the same error and it is very frustrating.

I think there is something wrong here.


I have production apache installations that I manage vhosts all the time, but something about this setup is not working for me at all.

-Jackson
Top
Telamon
Tux's lil' helper
Tux's lil' helper
Posts: 129
Joined: Mon Dec 29, 2003 5:58 pm

Prong dir permissions

  • Quote

Post by Telamon » Sun Feb 01, 2004 7:35 am

The dir permissions have to be 755 (drwxr-xr-x) For directories, the execute flag means you are alowed to access the directory. If you don't have execute permissions on a dir, you can't access any file in that dir, no matter what the individual file permissions for the file are.
Top
adpowers
n00b
n00b
Posts: 25
Joined: Tue Jan 14, 2003 8:05 pm
Contact:
Contact adpowers
Website

  • Quote

Post by adpowers » Fri Feb 13, 2004 6:55 am

I've tried chmodding it to 755, with no luck. What user name should it be under? Currently it is chowned with my user and group.

After given up with the ebuild, I tried installing Apache2 from source. I still get the same problem. Here is my error log:

Code: Select all

[Thu Feb 12 22:49:31 2004] [error] [client 192.168.1.123] (13)Permission denied: access to / denied
I don't think it should be a / here. Shouldn't it point to the directory on the filesystem it can't access? However, if I comment out the default line of:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Then I get this error message:

Code: Select all

[Thu Feb 12 22:39:36 2004] [crit] [client 192.168.1.123] (13)Permission denied: /home/<username>/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
It should try to access that .htaccess file because AllowOverride is off and that isn't the directory I specified for DocumentRoot, I specified /home/<username>/www/

Any comments? Thoughts? This is really starting to frustrate me because I want to get this machine up and running all my production stuff.

Thanks,
Andrew
Top
shireRom
n00b
n00b
User avatar
Posts: 17
Joined: Tue Feb 18, 2003 2:38 pm
Location: Regensburg, Germany

  • Quote

Post by shireRom » Tue Feb 17, 2004 1:33 pm

Hi,

try to put the <Directory>-Tag outside the <VirtualHost>-Tag.

This should work.
Top
Halcy0n
Developer
Developer
User avatar
Posts: 1682
Joined: Wed Sep 17, 2003 5:09 am
Location: Freehold, NJ
Contact:
Contact Halcy0n
Website

  • Quote

Post by Halcy0n » Thu Mar 11, 2004 3:24 am

If you do chmod a+x your_home_dir, it should work. I didn't want to make my home directory executable by all though, so I just added apache into the users group in /etc/group and then set my home dir to 710, so just the group will have executable access. Hope this helps.
Mark Loeser
http://www.halcy0n.com
Top
Post Reply

12 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic