|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi
i have installed RedHat Linux 6.2 with Apache 1.3.12 what i need to be able to do is uploaded all my sites to the new server in virtual hosts and be able to access them via IE. is it possible to use www.sitename.com or do i have to use IP address i have been through the Apache manual on virtual hosts, but still with no luck thanks in advance :] Jonny |
|
#2
|
|||
|
|||
|
>>be able to do is uploaded all my sites to the new server in virtual hosts
What do you mean? Are you trying to migrate your existing sites from elsewhere to your local web server and keeping the same domain names? |
|
#3
|
|||
|
|||
|
i want to be able to set all my sites up on my local server.. and access them via a links page
when i setup the first virtual host it all works fine using http://112.112.112.11/site/www to access it, as soon as i set up the next site they dont work it seems to take the first site as the default :[ |
|
#4
|
|||
|
|||
|
>>i want to be able to set all my sites up on my local server
So are you using Name-based vhost? >>the first virtual host it all works fine using http://112.112.112.11/site/www There was a configure problem obviously. Show us all your <VirtualHost> blocks. |
|
#5
|
|||
|
|||
|
i must stress that this linux box is kept offline for testing purposes.. i just want to be able to access various sites to work on them offline.
NameVirtualHost 112.112.112.3 <VirtualHost 112.112.112.3> ServerAdmin admin@localhost ServerName fishomania VirtualDocumentRoot /home/sites/fishomania ScriptAlias /cgi/bin/ /home/sites/fishomania/cgi-bin Options ExecCgi Includes IncludesNOEXEC Indexes </VirtualHost> <VirtualHost 112.112.112.3> ServerAdmin admin@localhost ServerName elitewebdesigns VirtualDocumentRoot /home/sites/%0 ScriptAlias /cgi/bin/ /home/sites/elitewebdesigns/cgi-bin Options ExecCgi Includes IncludesNOEXEC Indexes </VirtualHost> <VirtualHost 112.112.112.3> ServerAdmin admin@localhost ServerName up-loaded DocumentRoot /home/sites/up-loaded ScriptAlias /cgi/bin/ /home/sites/up-loaded/cgi-bin Options ExecCgi Includes IncludesNOEXEC Indexes </VirtualHost> <VirtualHost 112.112.112.3> ServerAdmin admin@localhost ServerName dolphinmania DocumentRoot /home/sites/dolphinmania ScriptAlias /cgi/bin/ /home/sites/dolphinmania/cgi-bin Options ExecCgi Includes IncludesNOEXEC Indexes </VirtualHost> <VirtualHost 112.112.112.3> ServerAdmin admin@localhost ServerName petersstationery DocumentRoot /home/sites/petersstationery ScriptAlias /cgi/bin/ /home/sites/petersstationery/cgi-bin Options ExecCgi Includes IncludesNOEXEC Indexes </VirtualHost> <VirtualHost 112.112.112.3> ServerAdmin admin@localhost ServerName snowblind DocumentRoot /home/sites/snowblind ScriptAlias /cgi/bin/ /home/sites/snowblind/cgi-bin Options ExecCgi Includes IncludesNOEXEC Indexes </VirtualHost> <VirtualHost 112.112.112.3> ServerAdmin admin@localhost ServerName younghosting DocumentRoot /home/sites/younghosting Options ExecCgi Includes IncludesNOEXEC Indexes </VirtualHost> |
|
#6
|
|||
|
|||
|
>>NameVirtualHost 112.112.112.3
So don't use IP address to access your sites. >>i have been through the Apache manual on virtual hosts, but still with no luck Unfortunately, this link -> "Multiple local hostnames ??" http://www.devshed.com/Talk/Forums/Forum15/HTML/000142.html has been removed so I guess I will repost it using a quick and dirty way. Edit /etc/hosts file: 112.112.112.3 www.sitename.com fishomania elitewebdesigns up-loaded dolphinmania petersstationery... Now try to use http://fishomania to access to your sites. |
|
#7
|
|||
|
|||
|
cheers for the help
but i get a "page cannot be displayed" when i try and access any site through http://site/ i am probably setting up apache completely wrong :] ta anywayz |
|
#8
|
|||
|
|||
|
You can't use IE. You need to access to your vhost sites from within your redhat box.
|
|
#9
|
|||
|
|||
|
Try setting the Virtual hosts like below, each with it's own name in the VirtualHost Tag.
On your web browser machine, make sure it will resolve each name to the same IP address. IE Put them all in your hosts file or configure your DNS server accordingly. You must now access the sites by name, and apache will resolve them appropriately IE http://www.site1 Hope this helps. <VirtualHost 112.112.112.3 www.site1> ServerAdmin admin@localhost </VirtualHost> <VirtualHost 112.112.112.3 www.site2> ServerAdmin admin@localhost </VirtualHost> <VirtualHost 112.112.112.3 www.site3> ServerAdmin admin@localhost </VirtualHost> ------------------ Euan de Kock Gekko Services (Pvt) Ltd |
|
#10
|
|||
|
|||
|
Don't forget that this kind of name-based virtual hosting depends on HTTP host headers, which are a feature of HTTP 1.1. So make sure your browser's "use HTTP1.1" option is turned on, if it has one.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Help with Virtual hosts on apache |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|