Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > MacNN Lounge > Virtual Hosts with subdomains?

Virtual Hosts with subdomains?
Thread Tools
l008com
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 28, 2002, 11:55 PM
 
Can you use Virtual Hosts in apache with subdomains?
Can I have me.com and car.me.com both point to the same IP and have apache treat them as if they were complete different, like it does for me already with 3 totally different sites?
     
fxbezak
Senior User
Join Date: May 2001
Location: mysql> CREATE TABLE bar (m INT) SELECT beer FROM tap;
Status: Offline
Reply With Quote
Jul 30, 2002, 09:35 PM
 
sure.

just create 2 seprate entrys for them, both pointing to the same directory.

hello.world.com
goodbye.world.com
The Desires of Youth are the Regrets of Maturity.
http://www.unixtree.net
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 30, 2002, 09:43 PM
 
Well I don't want them to point to the same directory, i want them to point to different ones, just using the same IP :-) I assume it would work.
     
fxbezak
Senior User
Join Date: May 2001
Location: mysql> CREATE TABLE bar (m INT) SELECT beer FROM tap;
Status: Offline
Reply With Quote
Jul 30, 2002, 09:45 PM
 
oh yea
the way i have my server set up is that i have multiple domains all going to the same IP

sub domains and www domains as well
do you need an example?
and i have multiple entries for other domains. the IP notice in teh VirtualHost is all the same.

#===========================================
<VirtualHost 63.166.224.70>
ServerAdmin [email protected]
DocumentRoot /home/httpd/www.pinkfloyd.org
ServerName <a href="http://www.pinkfloyd.org" target="_blank">www.pinkfloyd.org</a>
ServerAlias pinkfloyd.org <a href="http://www.pinkfloyd.org" target="_blank">www.pinkfloyd.org</a>
ErrorLog /home/httpd/www.pinkfloyd.org/logs/error_log
CustomLog /home/httpd/www.pinkfloyd.org/logs/access_log combined
ScriptAlias /cgi-bin/ /home/httpd/www.pinkfloyd.org/cgi-bin/
ErrorDocument 404 /404.html
&lt;/VirtualHost&gt;

&lt;Directory /home/httpd/www.pinkfloyd.org/&gt;
Options ExecCGI FollowSymLinks Includes
AllowOverride All
&lt;/Directory&gt;
The Desires of Youth are the Regrets of Maturity.
http://www.unixtree.net
     
   
 
Forum Links
Forum 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 On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:35 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,