Date: Wed, 14 Jul 1999 23:00:35 +0100 From: "Richard Morte" <richard@sinclairassoc.force9.co.uk> To: <freebsd-questions@FreeBSD.ORG> Subject: Configuring Apache 1.3.4 Message-ID: <LOBBKEGHCNEHPLGFIAKPMEDECAAA.richard@sinclairassoc.force9.co.uk>
next in thread | raw e-mail | index | archive | help
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
...
<VirtualHost 10.0.0.1>
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
...
</VirtualHost>
...
<ViurtualHost _default_:80>
DocumentRoot /usr/local/www/data/default/htdocs
...
</VirtualHost>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?LOBBKEGHCNEHPLGFIAKPMEDECAAA.richard>
