[thelist] Configure Apache VirtualHost AND Using PHP with Apache 2
Hans Zaunere
zaunere at yahoo.com
Wed Jun 19 15:56:00 CDT 2002
--- David Bindel <dbindel at austin.rr.com> wrote:
> I just made the move from Windows 2000 Server to Red Hat Linux last
> night......
Exxxcellent...
>
> I am trying to set up Apache to host 2 separate websites on ports 80
> and 82, but unfortunately, after many different configuration
> *tries*, I have given up and chosen to bring my problem to thelist.
Why would you want two instances of Apache on two ports? Use the magic
that is virtual hosting.
> I don't really understand the NameVirtualHost command or the whole
> VirtualHost thing.
In your httpd.conf, start with something like:
NameVirtualHost 123.45.67.89
<VirtualHost 123.45.67.89>
ServerName yourdomain1.com
ServerAlias www.yourdomain1.com
## More configuration
</VirtualHost>
<VirtualHost 123.45.67.89>
ServerName yourdomain2.com
ServerAlias www.yourdomain2.com
## More configuration
</VirtualHost>
And regard http://httpd.apache.org/docs/vhosts/index.html as your
savior.
>
> Also, I can't figure out how to install PHP for use with Apache 2.
Simply, don't. If these are at all production level websites, don't
use Apache 2 with PHP yet. Go to httpd.apache.org and get a nice fresh
Apache 1.3.26 package (because of the security problems with 1.3.24 -
they are only reported as being exploitable on Windows and possibly
64bit UNIX, but hey, why risk it?). Otherwise I think it's something
like:
./configure --with-apxs2=/usr/local/apache2/bin/apxs
But I don't recommend it, and I doubt it will work with only the
command I used.
http://www.php.net/manual/en/install.apache.php
HZ
New York PHP
http://nyphp.org
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
More information about the thelist
mailing list