The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> Apache Development
|
Help with Virtual hosts on apache
Discuss Help with Virtual hosts on apache in the Apache Development forum on Dev Shed. Help with Virtual hosts on apache Apache Development forum discussing HTTP Server general topics, configuration, and modules. Apache is an open source web server that runs on multiple platforms.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

September 25th, 2000, 05:58 PM
|
|
Junior Member
|
|
Join Date: Sep 2000
Location: UK
Posts: 14
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
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
|

September 25th, 2000, 10:03 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
>>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?
|

September 27th, 2000, 04:29 PM
|
|
Junior Member
|
|
Join Date: Sep 2000
Location: UK
Posts: 14
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
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
:[
|

September 27th, 2000, 08:43 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
>>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.
|

September 28th, 2000, 01:56 PM
|
|
Junior Member
|
|
Join Date: Sep 2000
Location: UK
Posts: 14
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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>
|

September 28th, 2000, 04:05 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
>>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.
|

September 28th, 2000, 05:17 PM
|
|
Junior Member
|
|
Join Date: Sep 2000
Location: UK
Posts: 14
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
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
|

September 28th, 2000, 10:07 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
You can't use IE. You need to access to your vhost sites from within your redhat box.
|

September 29th, 2000, 04:11 AM
|
|
Junior Member
|
|
Join Date: Sep 2000
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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
|

October 2nd, 2000, 04:48 AM
|
|
Junior Member
|
|
Join Date: Oct 2000
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|