From owner-freebsd-questions Wed Jul 14 15: 2:19 1999 Delivered-To: freebsd-questions@freebsd.org Received: from merlins.force9.net (merlins.force9.net [195.166.128.23]) by hub.freebsd.org (Postfix) with SMTP id 3E31114CCD for ; Wed, 14 Jul 1999 15:01:48 -0700 (PDT) (envelope-from richard@sinclairassoc.force9.co.uk) Received: (qmail 10546 invoked from network); 14 Jul 1999 22:00:52 -0000 Received: from mayfly.plus.net.uk (HELO mayfly.force9.net) (195.166.128.28) by merlins.force9.net with SMTP; 14 Jul 1999 22:00:52 -0000 Received: (qmail 19977 invoked from network); 14 Jul 1999 22:00:51 -0000 Received: from 00-40.dialup.force9.net (HELO sinclairassoc) (195.166.130.104) by mayfly.plus.net.uk with SMTP; 14 Jul 1999 22:00:51 -0000 From: "Richard Morte" To: Subject: Configuring Apache 1.3.4 Date: Wed, 14 Jul 1999 23:00:35 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, As a designer of web sites I wanted to set up a local standalone server to test the site before uploading. Most of my work involves cgi/perl so an Apache Server running on FreeBSD seemed a good choice. Have installed and loaded FreeBSD with only a few problems, most of which were sorted out by looking through the docs and FAQs. However, I am stuck with an Apache configuration. Please bear in mind I've only been at this (and Unix) a couple of days, so I'm at the start of the learning curve. Here goes... Apache is up and running and will serve web pages with the URL httpd://localhost/ but I want to configure virtual hosts to emulate the sites for different clients. This is the bit I'm stuck on. I'm using FreeBSD 3.1-stable / Apache version 1.3.4. The Unix box is standalone, no network cards, no modem. The cgi- bit will be implemented later, once the virtual hosts are sorted. 1. /etc/rc.conf configured with the following: hostname="sparky.at.home" tcp_extensions="YES" # this was added in desperation, but made no difference 2. /etc/hosts configured with the following: 127.0.0.1 localhost sparky.at.home 10.0.0.1 www.client2.local 10.0.0.2 www.client2.local etc. 3. /usr/local/etc/apache/httpd.conf configured with: ServerType standalone ServerRoot /usr/local ExtendStatus On Port 80 User nobody Group nogroup ServerName sparky.at.home DocumentRoot "/usr/local/www/data" HostnameLookup On ... ServerName www.client1.local DocumentRoot /usr/local/www/data/client1/htdocs # the htdocs bit mirrors the isp's webspace structure, that's why it's there ... ... DocumentRoot /usr/local/www/data/default/htdocs ... Note that I had to specify the full path for the document roots for the virtual hosts, not just the relative "/www/data/... " bit because http complained that the directories did not exist. 4. The directory structure is as follows: /usr |--- /local |--- /www |---/data |--- /default (drwxr-xr-x own/grp: root/wheel)) | |--- /htdocs (drwxr-xr-x own/grp: root/wheel) | |--- /client1 (drwxr-xr-x as above) | |--- /htdocs (drwxr-xr-x as above) | etc The intention was to create a scratch area using /default/htdocs with clients' html maintained in each separate client directory accessed via www.clientn.local No errors are reported in the /var/log/httpd-errors 5. a ping to localhost as well as sparky.at.home is successful, but to www.client1.local returns the error: ping: send to: No route to host 6. The kde browser and Netscape (4.6.1) will access and deliver webpages; the default Apache "It worked" page using http://localhost/ or http://sparky.at.home" with Netscape but the kde browser delivers Directory of /. Why these two should be different is beyond me but Netscape is clearly pointing at /usr/local/www/data/index.html whereas the kde browser is pointing to /usr/local/www/data/default/ 7. When trying to access http://www.client1.local Netscape reports that there is no tcp/ip connection to the host; the kde browser returns a 404 not found. OK, that's a lot of info - I only hope it helps. If anyone can help me get over this hurdle I'd be eternally grateful. Richard Morte To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message