GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 13-Nov-2003, 11:11
jnorris jnorris is offline
New Member
 
Join Date: Nov 2003
Posts: 8
jnorris is on a distinguished road

Apache multiple localhosting - desperate!


I am using WinME and Apache 1.3.28 It works fine,
but will only look at one site. This is depseration after three solid weeks of begging for help. Is there anyone out there.

I have 3 sites to test locally but Apache will only see the one first listed in VirtualHosts. I even renamed my web folders with the web address /site1 became
/www.site1.com so that links from one web site would correctly find the other - but no - always tries to go to the internet.

I beg your help, please!
************************
This is the only unhashed line in my hosts file
127.0.0.1 localhost http://www.loire-style.com http://www.french-style.co.uk http://www.wizardwonky.com

I have also tried it as hosts.sam
They both sit in the main Windows/ folder
I have also tried them in Windows/system32 and Windows/system32/drivers and Windows/system I have tried it with and without localhosts. It appears to me that Apache is ignoring these files as it always opens to
whichever VirtualHost is listed first in the httpd.conf file.

When I start Apache I get two messages:
VirtualHost overlap on Port 80. The first has precedence.
If I drop the Port 80 it suggests I need a NameVirtualHost directive

This is the relevant bit of my httpd.conf file

<VirtualHost *:80>
ServerName http://www.loire-style.co.uk
ServerAdmin jon@herefordshire.com
DocumentRoot "C:/My Documents/webs/style/www.loire-style.com"
DirectoryIndex index.html index.htm index.php
Options All MultiViews
ScriptAlias /cgi-bin/ "C:/My
Documents/webs/style/www.loire-style.com/cgi-bin"
<Directory /webs/style/www.loire-style.com/cgi-bin>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

<VirtualHost *:80>
ServerName http://www.french-style.co.uk
ServerAdmin jon@herefordshire.com
DocumentRoot "C:/My Documents/webs/style/www.french-style.co.uk"
DirectoryIndex index.html index.htm index.php
Options All MultiViews
</VirtualHost>

<VirtualHost *:80>
ServerName http://www.wizardwonky.com
ServerAdmin jon@herefordshire.com
DocumentRoot "C:/My Documents/webs/www.wizardwonky.com"
DirectoryIndex index.html index.htm index.php
Options All MultiViews
</VirtualHost>
  #2  
Old 13-Nov-2003, 18:48
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

Apache Virtual Hosts settings on WinME / Apache 1.3+


Hello jon,

I also use WinME and Apache 1.3+ (I use Apache 2 on Linux). I will just copy a few things off my own settings for the following and include some relevant info below:

hosts.sam - If you want to view your 'development' site, e.g. www.wizardwonky.com , that's inside your PC, this file has to be renamed to HOSTS; preferably before you start your browser. My copy has always been inside c:\windows.

Backup your existing httpd.conf file and try these settings instead (where appropriate):
Code:
# # Use name-based virtual hosting. # NameVirtualHost 127.0.0.1:80 <virtualhost 127.0.0.1> ServerName localhost ServerAdmin admin@localhost DocumentRoot "C:/My Documents/webs/style/www.loire-style.com" </virtualhost> <virtualhost 127.0.0.1> ServerName www.french-style.co.uk ServerAdmin admin@localhost DocumentRoot "C:/My Documents/webs/style/www.french-style.co.uk" </virtualhost> <virtualhost 127.0.0.1> ServerName www.loire-style.co.uk ServerAdmin admin@localhost DocumentRoot "C:/My Documents/webs/style/www.loire-style.com" </virtualhost> <virtualhost 127.0.0.1> ServerName www.wizardwonky.com ServerAdmin admin@localhost DocumentRoot "C:/My Documents/webs/style/www.wizardwonky.com" </virtualhost> # Once this works, you can add the rest...

I hope that will work for you

n.b. NEVER include your email address inside a forum message if you don't want the spambots to harvest it and start sending you spam! Always use a fake one in your example posts e.g. jon@example.com.
  #3  
Old 14-Nov-2003, 04:20
eRIC eRIC is offline
Junior Member
 
Join Date: Nov 2003
Location: Kyrgyzstan
Posts: 31
eRIC is on a distinguished road

Hi


I want to ask something:
Will above virtual hosts work on LAN? my http://www.eric.kg and http://www.test.kg on my computer are working but if then queried from other computers on my LAN (proxy in FreeBSD, i add 192.168.3.8 http://www.eric.kg
192.168.3.8 http://www.test.kg )
They show the same thing.
Please help me.Thank you.
__________________
Copyright by eRIC 2003 © !!!
  #4  
Old 14-Nov-2003, 07:53
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello eRIC,

I have absolutely NO experience in Networking or how it works, so I am unable to help you with your issue at the moment. <-- That's the bad news

The OK news is that there might be someone, someday, who will find this thread and possibly offer you a solution.
  #5  
Old 14-Nov-2003, 11:09
butterflytown butterflytown is offline
New Member
 
Join Date: Nov 2003
Posts: 2
butterflytown is an unknown quantity at this point

Local network


You can't see them on your local network since your local network sens the "virtual host name" of 192.168.3.8 or whatever the IP is. If yuo try to browse to the DNS names they won't work. There are 2 possible solutions. Have your own DNS server that knows your host names and forwards them to your server so that your browser sends the proper "virtual host name" or check your hosts file and add those entries to your hosts file


Just to explain what I was trying to say, virtual names work based on the browser telling your server what web page it's trying to access (say www.apache.org). when Apache recieves "192.168.3.8" as a host name it doesn't recognize it and so just forwards it to the first or default virtualhost. You can't separate which page you want by virtual names unless you're sending a proper name.

hope this helps, I'm not absolutely sure this is the question you're asking but I thought I'd give my 2 cents.
  #6  
Old 16-Nov-2003, 23:01
eRIC eRIC is offline
Junior Member
 
Join Date: Nov 2003
Location: Kyrgyzstan
Posts: 31
eRIC is on a distinguished road
Smile

Thanks


Thank you. You spent your time for my trouble, thanks a lot.
But in my mind i have some questions, what would you give me as a advise in my problem? Should i use ip based virtual hosts?
example: 192.168.3.8 for http://www.eric.kg and 192.168.3.9 for http://www.test.kg OR use different ports for virtual hosts, but in some cases firewalls don't permit other ports (in our university is like this).
But how it works on other servers? Big servers as a ICQ,....( some our local servers uses virtualhosts) or they use something else?

I will be glad if you write some lines.
Thanks
__________________
Copyright by eRIC 2003 © !!!
  #7  
Old 23-Nov-2003, 22:16
eRIC eRIC is offline
Junior Member
 
Join Date: Nov 2003
Location: Kyrgyzstan
Posts: 31
eRIC is on a distinguished road

Oh ohe problem more


Hi !!!
I just want to know why this programm named as a Apache?
Is anyone can help me? please it is so important for me !!!
thanks
__________________
Copyright by eRIC 2003 © !!!
  #8  
Old 23-Nov-2003, 22:56
BobbyDouglas's Avatar
BobbyDouglas BobbyDouglas is offline
Regular Member
 
Join Date: Aug 2003
Posts: 789
BobbyDouglas has a spectacular aura aboutBobbyDouglas has a spectacular aura about
Taken from here:
A cute name which stuck. Apache is "A PAtCHy server". It was based on some existing code and a series of "patch files".
__________________
Mr. Bob's Web Design - Tirelessly looking for ways to enhance the customer base of your business.
  #9  
Old 23-Nov-2003, 23:55
eRIC eRIC is offline
Junior Member
 
Join Date: Nov 2003
Location: Kyrgyzstan
Posts: 31
eRIC is on a distinguished road
Smile

thanks


Thanks a lot !!!
__________________
Copyright by eRIC 2003 © !!!
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache php no longer working (MX??) XP?? ChicoMendez Apache Web Server Forum 5 30-Aug-2004 10:51
SE Friendly URLs Apache Bug? JamesRxx555 Web Hosting Forum 18 18-May-2004 04:50
connect tomcat to apache kefen Apache Web Server Forum 0 11-Dec-2003 22:13
Apache In Windows Xp JUNK KED Apache Web Server Forum 8 30-Nov-2003 08:48
2 apache installs, 1 network mkyb14 Apache Web Server Forum 3 18-Nov-2003 02:01

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 05:10.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.