Apache problems...

Discussion in 'OT Technology' started by kiLLj0y, May 21, 2004.

  1. kiLLj0y

    kiLLj0y New Member

    Joined:
    Sep 6, 2003
    Messages:
    3,668
    Likes Received:
    0
    Location:
    Houston, Tx
    Basics: I have a dedicated server, running Slackware and Apache 2.0.49, hosting a handful of domains, and shells issed to a few close friends. One of them wants to use a domain I host as his homepage. For sake of ease, his account name is user2, and his html dir is /home/user2/public_html.

    Problem: No matter how I try to access his public html dir, I get a 403 forbidden error. I have NO problem getting to the public_html dir in my own home directory. I even changed httpd.conf to point he domain I want to use to my public_html dir, and it worked! Any other account, and its a 403 error. If I do domain.com/~user2, I get an error, domain.com/~mylogin it works fine. You get the idea... I even tried to access the public_html dir of another account I have on the server, and had the same 403.

    Here is the VirtualHost setup for the domain, copied from my httpd.conf:

    Code:
     
    NameVirtualHost domain2.com:80
    <VirtualHost domain2.com:80>
    	ServerAdmin [email="[email protected]"][email protected][/email]
    	DocumentRoot /home/user2/public_html
    	ServerName domain2.com
    	ErrorLog logs/domain2.com-error_log
    	CustomLog logs/domain2.com-access_log common
    	CustomLog logs/domain2.com-referer_log referer
    </VirtualHost> 
    
    Snippet of the error_log for the domain2.com
    [Fri May 21 08:08:45 2004] [error] [client 67.161.89.30] (13)Permission denied: access to / denied

    Anyone got some ideas?! I've been reading whatever I can find on google, and see no documentation about what would cause one user's public_html (mine) work, and no one elses. :rant2:
     
  2. kiLLj0y

    kiLLj0y New Member

    Joined:
    Sep 6, 2003
    Messages:
    3,668
    Likes Received:
    0
    Location:
    Houston, Tx
    By the way, all users are in the same group (users), and no others. They are all just regular shell accounts. Each public_html dir was made by the respective user, and each public_html dir has an index.html in it with 1 simple line of text or testing purposes.
     
  3. Ximian

    Ximian New Member

    Joined:
    Mar 20, 2004
    Messages:
    1,860
    Likes Received:
    0
    Location:
    DCA
    Make sure the directory and contects are world readable.
    Also, try a

    <Location />
    AllowOverride All
    </Location>

    That way you can set the different options in there, like DirectoryIndex and etc.

    Look at my example though, it'll teach you a bit about vhosts -

    NameVirtualHost 192.168.1.34
    <VirtualHost 192.168.1.34>
    ServerAdmin [email protected]
    DocumentRoot /usr/local/www/data/
    ServerName sysadmin.ods.org
    # ErrorLog /var/log/httpd-error defaults to httpd error log
    # CustomLog /var/log/httpd-access combined same, but access
    <Location />
    AllowOverride All
    </Location>
    </VirtualHost>
    <VirtualHost 192.168.1.34>
    ServerAdmin [email protected]
    DocumentRoot /usr/local/www/m3gtr.ods.org/
    ServerName m3gtr.ods.org
    ErrorLog /var/log/apache/m3gtr.ods.org-error
    CustomLog /var/log/apache/m3gtr.ods.org-access combined
    <Location />
    AllowOverride All
    </Location>
    </VirtualHost>

    If you have a static IP, replace 192.168.1.34 with your own.
     

Share This Page