You have helped a lot already! Let's just hope I can get this to work. Thx!! Larry Flathmann wrote:
As I think about it, I think the easiest thing would be to forward your other domains to realwebonline.net:81 and realwebonline:82Then in Apache you can use mod_rewrite to do redirection from realwebonline:81 to medxinfo.net, etc.I wish I had time to help you figure out the details! --Larry jvz wrote:Thx! It does make sense! Larry Flathmann wrote:Hi Johan,It looks to me like the problem is not with Apache, the problem is with your DNS forwarding.If you forward another domain to realwebonline.net, then Apache is going to receive a request for the realwebonline website, and Apache is going to respond with the realwebonline website.I'm not familiar with Dynamic DNS forwarding, but to get it to work you have to direct your DNS to the ip address of your server, not to the domain name of realwebonline.net.One workaround that you might try is to do your DNS forwarding to different port numbers. Then at your router or in Apache you could distinguish between the different websites by port number.Hope that helps! Larry jvz wrote:HiHave been trying to solve this on the comp.lang.clarion News Group but to no avail.I will just post some of the replies. === Hi Apache, Virtual Hosting, Dynamic IP, DNS2Go, GoDaddy. I am having problems with Virtual Hosting. www.realwebonline.net points to the Name Servers of DNS2Go i.e. ns1.dns2go.com etc. as suggested by DNS2Go. On my internal server I have the DNS2Go client installed. All my other domains are forwarded to www.realweboline.net My main site is www.realwebonline.net and that sould lead you to page that says " This is Realwebonline" etc. and www.medx.info should show the proper MEDX webpage but it doesn't, it shows the realwebobline page. www.realsql.net should also announce itself with a "This is..." Internally, inside the router, it all works properly. But from the outside ... Nope Here is my current sript. NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:/_MySites/docs/realwebonlinenet" ServerName realwebonline.net ServerAlias www.realwebonline.net realwebonline.net DirectoryIndex index.html index.html.var index.htm index.php ErrorLog C:/_MySites/logs/realwebonlinenet-error.log CustomLog C:/_MySites/logs/realwebonlinenet-access.log common </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/_MySites/docs/medxinfo" ServerName medx.info ServerAlias www.medx.info medx.info DirectoryIndex index.html index.html.var index.htm index.php ErrorLog C:/_MySites/logs/medxinfo-error.log CustomLog C:/_MySites/logs/medxinfo-access.log common </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/_MySites/docs/realsqlnet" ServerName realsql.net ServerAlias www.realsql.net realsql.net DirectoryIndex index.html index.html.var index.htm index.php ErrorLog C:/_MySites/logs/realsqlnet-error.log CustomLog C:/_MySites/logs/realsqlnet-access.log common </VirtualHost> Maybe I must forget about forwarding, would it be psosible to rather point all the domains to DNS2Go NameServers and then the Virtual Hosting should work. But the DNS2Go client running on my inhouse server can only register one domain at a time i.e realwebonline.net? How now brown cow? === Johan Your 'servername' should have the www in front, as in <VirtualHost *:80> DocumentRoot "C:/_MySites/docs/realwebonlinenet" ServerName www.realwebonline.net ServerAlias realwebonline.net DirectoryIndex index.html index.html.var index.htm index.php ErrorLog C:/_MySites/logs/realwebonlinenet-error.log CustomLog C:/_MySites/logs/realwebonlinenet-access.log common </VirtualHost> The VirtualHost concept works perfectly well! here is an extract of my httpd.conf: <VirtualHost *:80> SSLEngine off ServerName www.bgsoftfactory.com ErrorLog logs/softfactory_ssl_error.log CustomLog logs/softfactory_ssl_access.log combined RewriteEngine On RewriteRule ^/cgi-bin - [L] RewriteRule ^/(.*)http://127.0.0.1:8080/VirtualHostBase/http/www.bgsoftfactory.com:80/Plone/VirtualHostRoot/$1[P] <Proxy *> Order deny,allow Allow from all </Proxy> </VirtualHost> <VirtualHost *:80> ServerName exlinuxbox # used only Locally Alias /awstatsclasses "C:/Program Files/AWStats/wwwroot/classes/" Alias /awstatscss "C:/Program Files/AWStats/wwwroot/css/" Alias /awstatsicons "C:/Program Files/AWStats/wwwroot/icon/" Alias /stats "C:/Program Files/AWStats/wwwroot/" ScriptAlias /awstats/ "C:/Program Files/AWStats/wwwroot/cgi-bin/" <Directory "C:/Program Files/AWStats/wwwroot"> Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@xxxxxxxxxxxxxxxxx ServerName files.bgsoftfactory.com DocumentRoot "D:/PloneStorage" ErrorLog logs/www-bgsoftfactory-com-storage-error.log CustomLog logs/www-bgsoftfactory-com-storage-access.log common <Directory "D:/PloneStorage"> Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@xxxxxxxxxxxxxxxxx DocumentRoot "C:/ApacheSSL/htdocs/relagen/" ServerName www.healthprohome.com ErrorLog logs/www.healthprohome.com-error_log CustomLog logs/www.healthprohome.com-access_log common </VirtualHost> Bernard === > It does not work, set up as below. > They ALL land up with "The is realwebonline.net" instead of going to > the REAL medx.info or realsql websites? > Thx > JVZ They don't, at least from here: Here is what I get: www.medx.info: This is realwebonline.net http://www.realwebonline.net C:\_MySites\docs\realwebonlinenet This is http://www.realwebonline.net in its own 1folder on c:\mysites Don't work. www.realsql.com c:\mysites\docs\realwebonlinenet\realsqlcom This is http://www.realsql.com NOT in its own folder!As I don't see a DocumentRoot entry for medx, seems prety normal that itdoes not work... Bernard Works. ===> But there is a DocumentRoot for medx.info? Am I missing something, why> do you say there is no DocumentRoot for medx.info? Yes, you are. Medx.info is a DOMAIN name, not a SERVER (think MACHINE) name. It's not qualifying enough. VirtualHost REQUIRE fully qualified SERVER NAME. Re-read Apache doc. I have been trying to tell you so since a while , already.. <g> Bernard === > Hi Bernard> And you are also using Dynamic IP, i.e. you are hosting your websites> yourself on ADSL? > Which client are you client to sort out your Dynamic IP? > DNS2Go, DynDNS, ??? > Can I then assume that > www.bgsoftfactory.com> is your main domain and that the Name Server of this domain points to> NameServers DNS2Go, DynDNS, ??? ?No, I have now a fixed IP address, but I have been using DNS2Go for a longtime, and apache virtual hosting works exactly the same. It depends on server names, not of the way your DNS is setup. The only thing which matter, however you do it, is that a SERVER name match your APACHEVirtualHost server name (and that it get routed to the correct machine).I insists on SERVER name, as it seems you somewhat confuse between DOMAINname (bgsoftfactory.com) and SERVER name ( www.bgsoftfactory.com andfiles.bgsoftfactory.com, but also mail.bg...., ftp.bg..., secure.bg... etc,etc...) Bernard === Johan First, remove your ServerAlias directive, it just confuses you.Second, I am not sure why you put a name with another directory. Try this:NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:/_MySites/docs/medxinfo"ServerName www.medx.info DirectoryIndex index.html index.html.var index.htm index.phpErrorLog C:/_MySites/logs/medxinfo-error.log CustomLog C:/_MySites/logs/medxinfo-access.log common </VirtualHost><VirtualHost *:80> DocumentRoot "C:/_MySites/docs/realwebonlinenet" ServerName www.realwebonline.net DirectoryIndex index.html index.html.var index.htm index.phpErrorLog C:/_MySites/logs/realwebonlinenet-error.log CustomLog C:/_MySites/logs/realwebonlinenet-access.log common </VirtualHost>You have to know that the FIRST Virtual host will be the one used if www is not put in front of the domain ( That is, if there is no HOST/SERVER name,just a domain). In your case, and with the above example, if your maindomain is realwebonline, typing in a browser "realwebonline.net" should bring the medxinfo page, as there is no matching ServerName. And that isnormal and documented. Once you got that working as I describe, put back your ServerAliasdirective. But at least, you wil have sorted out the VirtualHost stuff!Bernard === > Is there a difference between > #DocumentRoot "C:/_MySites/docs/medxinfo" and > #DocumentRoot "C:\ _MySites\docs\medxinfo"? > i.e. will it make a difference if I use backslashes or forward > slashes?I think Apache prefer the first (slash instead of backslash, but that isnot your problem). Your problem is that you want to use domain names instead of fully qualified server names. Bernard === Johan > Here is the script as it is now - it still does not work Stupid question: Have you restarted Apache? Something is not making any sense, here, if you have.Are you sure you don't have the same html file in both directories? I don'twant you to feel offended by my questions, but I have been playingextensively with name based virtual hosts in Apache, and never seen it NOTwork, so far... Bernard === Hi I am not offended - anything to just solve this problem. And thx for all the trouble you have gone to up to now! Yes I restart Apache every time. And it works internally. So the script vh.conf actually works, it finds the correct html page everytime. But only inside the router, not from the outside world. The DNS2Go Clients points to realwebonline.net At godaddy: realwebonline.net points to DNS2Go's Name Servers and medx.net is Forwarded to http://www.realwebonline.net using GoDaddys own default NameServers. And the mask is www.medx.info So when you type in www.medx.info godaddy sends it to http://www.realwebonline.net. So when it gets to my router (the router setup points to 1.0.0.2 (which is the IP address of my internal webserver called rcserv1) it gets redirected to 1.0.0.2 - but by then it is looking for http://www.realwebonline.net and not www.medx.info? So that is why it ALWAYS and ONLY shows the realwebonline.net webpage? See attachments. Thx Johan Hi Apache User List So far my problem has not resolved.---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTP Server Project.See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTP Server Project.See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
-- ==================== Kind Regards, Johan van Zyl JVZ Systems CC/realcorp.net BOX 3469 Somerset West 7129 Tel: +27 (0)21 851 7205 Fax: 088 021 852 2387 Cell: +27 (0)82 875 4238 johan@xxxxxxxxx <%5C%22mailto:johan@xxxxxxxxx%5C%22> http://www.jvz.co.za <%5C%22http://www.jvz.co.za/%5C%22> <http://www.businesswarriors.co.za/warriors.php?ID=11544&L=2> --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx