RE: [PHP] multiple local domains under apache
| From: | Kurt Boyer | Date: | Mon, 14 Aug 2000 15:41:35 +0000 |
| Subject: | RE: [PHP] multiple local domains under apache | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11618@lists.php.net to get a copy of this message | ||
Here's how I do it in the apache httpd.conf file:
1) Setup multiple ports first (like this)
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
Listen 8081
Listen 8082
Listen 8083
Listen 8084
Listen 8085
Listen 8086
2) Setup your virtual hosts (like this)
#<VirtualHost user1.yourdomain.com>
<VirtualHost 222.222.222.222:8081>
ServerAdmin nospam@yahoo.com
DocumentRoot /usr/local/SomeonesDir/htdocs
<Directory "/usr/local/SomeonesDir/htdocs">
Options Indexes FollowSymLinks +Includes
AllowOverride None
</Directory>
ScriptAlias /cgi-bin/ /usr/local/SomeonesDir/cgi-bin/
ServerName user1.yourdomain.com
AddType text/html .shtml
AddHandler server-parsed .shtml
ErrorLog /usr/local/SomeonesDir/logs/error_log
TransferLog /usr/local/SomeonesDir/logs/access_log
</VirtualHost>
#<VirtualHost user2.yourdomain.com>
<VirtualHost 222.222.222.222:8082>
ServerAdmin nospam@yahoo.com
DocumentRoot /usr/local/SomeoneElsesDir/htdocs
<Directory "/usr/local/SomeoneElsesDir/htdocs">
Options Indexes FollowSymLinks +Includes
AllowOverride None
</Directory>
ScriptAlias /cgi-bin/ /usr/local/SomeoneElsesDir/cgi-bin/
ServerName user2.yourdomain.com
AddType text/html .shtml
AddHandler server-parsed .shtml
ErrorLog /usr/local/SomeoneElsesDir/logs/error_log
TransferLog /usr/local/SomeoneElsesDir/logs/access_log
</VirtualHost>
Hope this helps!
---
Kurt A. Boyer
Advanced Software Engineer
Matchlogic, Inc.
http://www.matchlogic.com
-----Original Message-----
From: Nick [mailto:n.curry@ucl.ac.uk]
Sent: Monday, August 14, 2000 9:35 AM
To: php-general@lists.php.net
Subject: [PHP] multiple local domains under apache
Hi,
sorry for posting this slightly off-topic post, i wasn't quite sure
where to post it and i thought it might interest some. I am designing a
number of websites under RH Linux w/apache, php, mysql and was hoping to
get Apache to serve up these different sites to me from my hard disk.
Does anyone know how to do this ? (with different local domain
names....)
I tried looking through the apache docs and couldn't find any info - i
tried setting up a virtual hosts sytem but it didn't seem to work. How
does everyone else do this ?
any help greatly appreciated
Nick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net