lipton112 Posted February 12, 2007 Share Posted February 12, 2007 (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 [email protected] # 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 [email protected] # 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 https://forums.phpfreaks.com/topic/38203-apache-multiple-websitevirutal-host/ Share on other sites More sharing options...
steviewdr Posted February 12, 2007 Share Posted February 12, 2007 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 [email protected] # DocumentRoot /www/docs/dummy-host.example.com and # ServerAdmin [email protected] # 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 https://forums.phpfreaks.com/topic/38203-apache-multiple-websitevirutal-host/#findComment-182931 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.