LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 06-04-2005, 04:54 PM   #1
Fredstar
Member
 
Registered: Jul 2004
Location: Rochester, NY
Distribution: Fedora9::FreeBSD7.1
Posts: 296

Rep: Reputation: 30
apache2 help -Virtual Host-


Im in the process of setting up three virtualhost sites with apache 2 on freebsd 5.4.

Normally ( on linux )

I would just creat a group and user , for example www (user) and users (group)

Then in the home directory of the new users www i would set-up the site architect as followed

users -www
/home/www/


--site one
/home/www/site1
/home/www/site1/html <--web files
/home/www/site1/cgi-bin <--virtual cgi-bin

--site two
/home/www/site2
/home/www/site2/html
/home/www/site2/cgi-bin

site-three
/home/www/site3
/home/www/site3/html
/home/www/site3/cgi-bin

And the httpd.conf file looks like this

<VirtualHost *>
ServerName site1.com
DocumentRoot /home/www/site1/html
VirtualScriptAlias /home/www/site1/cgi-bin
</VirtualHost> <--this two more times with the updated name,document root etc.

Now everytime i try to view site1 i get a forbidden error message which leades me to believe that i had to chmod it down. so naturally i do.

chmod 755 /home/www/site1/html

*however that does not fix it

so i tried to play around with the ownership with chown, but still no go. Any clue on what permission + owner/group the folders need to be so i can view my web content via the web?
 
Old 06-05-2005, 02:24 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Are you running in a chrooted environment?

Are there any messages in the error_log file?
 
Old 06-05-2005, 07:48 PM   #3
Fredstar
Member
 
Registered: Jul 2004
Location: Rochester, NY
Distribution: Fedora9::FreeBSD7.1
Posts: 296

Original Poster
Rep: Reputation: 30
Yes, the error in the error log is

Client Denied by server Config : /home/www/site1/html
Client Denied by server Config : /home/www/site1/html/favico.ico


Im searching around my .conf file to see if there is something i need to enable. No i do not believe im running a chrooted environment. So far its the basic install with apache2 nothing else modified but the httpd.conf and user/and directories of sites
 
Old 06-06-2005, 12:33 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Could you post a copy of httpd.conf.
 
Old 06-06-2005, 01:09 PM   #5
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
For permission bits -- You need at least 4 on files and 1 on directories (and the directories leading to that directory).

The user/group can be anything you want, but I normally do owner to the user's login name, and then group to the group apache runs as (normally www). That way you can just do a 750 recursively at the top level home directory.

Also, at the risk of pointing out the obvious -- If you don't have +Indexes in your config someplace for the vhosts (or serverwide) you'll need an index.html or you'll get 403'd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 virtual host. hgb Linux - Networking 10 01-24-2009 02:05 AM
Apache2 Virtual Host SSI problems superscrappy Linux - Software 1 08-30-2005 05:04 PM
Apache2 virtual host cgi 403 Forbidden / mossy Linux - Software 15 07-27-2005 04:56 PM
Can't do Apache2 virtual host different ports SK_pt Linux - Software 3 01-30-2005 07:04 PM
apache2, virtual host problems rjcrews Linux - Software 13 05-25-2004 08:16 PM


All times are GMT -5. The time now is 08:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration