Jump to content
The Uniform Server Community

Virtual Host works for some not others


hawkesley
 Share

Recommended Posts

I have configured vitual hosts to allow access to 4 sites.

The domain names of 3 are with one host and the fourth with another.

I have set the domain ip to point to my server, and this works for my first 3 sites.

However when I added a fourth with the different hosting company on the 26th Jan i just get the indes of my web root directory.

To check whether it was the domain host i registered another domain on the host that worked for my first 3 and set the Ip to the server. The result is the same - the index.

Can anyone suggest what eles I might do to sort this out.

 

Vitual host config

The last 2 sites are the problem.

 

##########VIRTUAL HOST SETUP##########

# WWW.E-BOOKS4U.NET

<VirtualHost *>

ServerName www.e-books4u.net

DocumentRoot /www/e-books4u

</VirtualHost>

 

##########VIRTUAL HOST SETUP##########

# WWW.CATERING4CASH.COM

<VirtualHost *>

ServerName www.catering4cash.com

DocumentRoot /www/catering4cash

</VirtualHost>

 

##########VIRTUAL HOST SETUP##########

# WWW.HAWKESLEYPUBLISHINGSOLUTIONS.COM

<VirtualHost *>

ServerName www.hawkesleypublishingsolutions.com

DocumentRoot /www/hawkesley

</VirtualHost>

 

##########VIRTUAL HOST SETUP##########

# WWW.KBCOACHING.CO.UK

<VirtualHost *>

ServerName www.KBcoaching.co.uk

DocumentRoot /www/kbcoaching

</VirtualHost>

 

##########VIRTUAL HOST SETUP##########

# WWW.KBCOACHING.COM

<VirtualHost *>

ServerName www.kbcoaching.com

DocumentRoot /www/kbcoaching

</VirtualHost>

Link to comment
Share on other sites

I can’t see anything wrong with your configuration file.

 

The fact you see your web-root folder means the domains are resolved correctly and are pointing to your server.

 

When Apache cannot resolve a ServerName it defaults to the first virtual host (your web-root folder www)

 

Strictly speaking www is not part of the domain hence these:

www.KBcoaching.co.uk

www.kbcoaching.com

 

May in reality be?

KBcoaching.co.uk

kbcoaching.com

 

Edit the virtual hosts to the above and see if it makes a difference.

 

All the best

Ric :)

Link to comment
Share on other sites

  • 8 months later...

Hey guys & gals...

 

I have a question. I use dynDNS, I know you can host more than one site but how do you get it to show http://www.my-domain-name.com and not http://www.dynDNS.selfip.com/main.html? When people type my domain name after the page loads it shows my DNS. I tried to set up a virtual host and it's still doing the same thing. Is there a way to stop this, because it shows up for every site I host. This didn't happen when I paid a web-hosting company I really don't want to go back to those days.

 

Thanks in advance for any help.

 

-Dallas

Link to comment
Share on other sites

The short answer you cannot do it using Vhosts.

 

I assume you have pointed your real domain my-domain-name.com to *. selfip.com

The free account does not allow you to cloak the redirection hence the displayed dynDNS name.

 

If you were to use cloaking it puts your sites into frames, this may or may not be an issue. Cloaking is a paid service.

 

I think their premium service allows you to transfer your real domain to their servers where they can then offer dynamic DNS on your real domain. The service is not free that’s where they make their money.

 

All the best

Ric :)

Link to comment
Share on other sites

The short answer you cannot do it using Vhosts.

 

I assume you have pointed your real domain my-domain-name.com to *. selfip.com

The free account does not allow you to cloak the redirection hence the displayed dynDNS name.

 

If you were to use cloaking it puts your sites into frames, this may or may not be an issue. Cloaking is a paid service.

 

I think their premium service allows you to transfer your real domain to their servers where they can then offer dynamic DNS on your real domain. The service is not free that’s where they make their money.

 

All the best

Ric :)

 

Hey Ric,

 

Thanks for the clarification. I guess I found one down side to hosting your own sites.

 

 

Best regards,

 

Dallas

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...