|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Apache httpd.conf setup challenge
I've searched the net and read a lot of examples on how to do virtual hosts with Apache 2.0.49. However, none of the examples ever seem to touch on quite what I'm doing. I have one server box serving 3 websites. Two of the wesites have domain names and the other is a test (development) site without a domain name. All three are internet accessable for group development and management. All of this is being run off a DSL router using IP Mapping to translate the internet IP into the correct local IP. The configuration of the sites is as follows:
69.208.17.121 -> www.digitalrushexperience.com -> 192.168.1.101 -> c:/apache/dre/ 69.208.17.123 -> www.schloctar.com -> 192.168.1.102 -> c:/apache/dr/ 69.208.17.124 -> (no domain name) -> 192.168.1.103 -> c:/apache/dre2/ I'm using a URL relocator offered by my domain provider / service. I notice links on my site use display the ip address in the status bar and not the domain name, if that matters. You can see that by going to the first site above and looking at the status of a link. With all that said, what should be my settings for the following four objects: ServerRoot (currently that would be "C:/Apache") Listen (I assume port 80?) ServerName (no idea) DocumentRoot (no idea) Then I don't know quite what to put in for the virtual host section given my above information. I always get an error when I try to restart Apache, and yes I'm remembering to shut down IIS to prevent conflicts. |
|
#2
|
|||
|
|||
|
RE: Apache httpd.conf setup challenge
# Must be the path to the exe
ServerRoot "C:/Apache" #This should grab all IP's Listen 0.0.0.0:80 ServerName nameme.mydomain.com DocumentRoot "c:/where/your/docs/are" # Make sure to comment out like below #NameVirtualHost *:80 <VirtualHost 69.208.17.121:80> ServerName www.digitalrushexperience.com DocumentRoot c:/where/your/docs/are </VirtualHost> <VirtualHost 69.208.17.123:80> ServerName www.schloctar.com DocumentRoot c:/where/your/docs/are </VirtualHost> #As for the unnamed one just point it to the box, it will respond with what is set at DocumentRoot |
|
#3
|
|||
|
|||
|
RE: Apache httpd.conf setup challenge
Thanks for the reply, I got it all working yesterday and for the benefit of anyone in the future in the same position, this is what I did:
ServerRoot "C:/Apache2" Listen 80 DocumentRoot "C:/apache2/web" <VirtualHost 192.168.1.101> DocumentRoot /apache2/web/dre <Directory "/apache2/web/dre"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost 192.168.1.103> DocumentRoot /apache2/web/dr <Directory "/apache2/web/dr"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost 192.168.1.104> DocumentRoot /apache2/web/dre2 <Directory "/apache2/web/dre2"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> The key was that all directories become subdirectories in the same path. I wasn't doing that before. Since my sites use directory browsing, I had to make sure to allow that feature as well. Now I just need to go back and resize the file name column so my values aren't truncated when the names are displayed. The above version avoides the whole name recognition problem and just goes off of ip recognition, which for me is the better way to go anyway. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Apache httpd.conf setup challenge |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|