Jump to content

Apache- Multiple Website/Virutal Host


lipton112

Recommended Posts

(Note- This is running on a windows platform)

Okay wait, let me start over. I think I have made some progress so far from before.

 

 

 

So far, from the box I want tot host these sites on will only have (1) IP. So, in that case I am going to use the following code in my httpd.conf file for Apache. PLEASE TELL ME IF THIS IS CORRECT. (Note- leagedns.com is the main site, but I want to add another subdomain named option-gaming.leaguedns.com).

 

 

 

NameVirtualHost *:80

 

#<VirtualHost *:80>

# ServerAdmin webmaster@dummy-host.example.com

# DocumentRoot /www/docs/dummy-host.example.com

# ServerName dummy-host.example.com

# ErrorLog logs/dummy-host.example.com-error_log

# CustomLog logs/dummy-host.example.com-access_log common

#</VirtualHost>

 

#<VirtualHost *:80>

# ServerAdmin admin@leagueservers.com

# DocumentRoot “C:/Documents and Settings/lipton/Desktop/ApacheServerFiles/sub1”

# ServerName option-gaming.leaguedns.com

# ErrorLog logs/mysite.error_log

# CustomLog logs/mysite.access_log common

#</VirtualHost>

 

 

 

 

*******All the files for the sub-domain I want to be in a folder called sub1.

 

 

 

Also corosponding with this will be anther config file placed in your windows/system32 folder named HOSTS. In this file, it tells me:

# Copyright © 1993-1999 Microsoft Corp.

#

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

#

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# space.

#

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a '#' symbol.

#

# For example:

#

# 102.54.94.97 rhino.acme.com # source server

# 38.25.63.10 x.acme.com # x client host

 

127.0.0.1 localhost

24.10.245.23 option-gaming.leaguedns.com

 

 

 

 

 

 

 

*********Is that right?

Link to comment
Share on other sites

First things first:

 

go to the command prompt and type:

ping dummy-host.example.com

 

and

 

ping option-gaming.leaguedns.com

 

if they dont return the ip address of your apache - no apache configing will work.

Whats this changing your hosts file that you are doing? Who said to do that? You know - by doing this your site will ONLY work from YOUR pc!

If the above pings work and return the correct ip - you need to go to a friends pc down the road etc. and try it from his to see if the domain name resolves to your ip address. ONLY when ping returns the correct ip - can apache take it from there. Im saying this - because: once you have your domainname resolving to your ip - it makes setting and testing your vhost config MUCH easier.

 

Also - a quick glance reveals:

# ServerAdmin webmaster@dummy-host.example.com

# DocumentRoot /www/docs/dummy-host.example.com

 

and

# ServerAdmin admin@leagueservers.com

# DocumentRoot “C:/Documents and Settings/lipton/Desktop/ApacheServerFiles/sub1”

 

Pick 1 directory path - linux or windows.

 

Take a look at: http://wiki.kartbuilding.net/index.php/Apache_2_%26_SSL_-_PHP4_-_MySQL_4.1

 

It might be a bit advanced. Check firstly if your ip resolves, then post back here.

 

-steve

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.