![]() |
|
#1
|
|||
|
|||
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
|
||||
|
||||
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:
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. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
HiI 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
|
||||
|
||||
|
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. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
|||
|
|||
Local networkYou 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
|
|||
|
|||
ThanksThank 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
|
|||
|
|||
Oh ohe problem moreHi !!!
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
|
||||
|
||||
|
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
|
|||
|
|||
thanksThanks a lot !!!
__________________
Copyright by eRIC 2003 © !!! |
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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