Subserver not working

17 posts / 0 new
Last post
#1 Sun, 11/21/2010 - 17:36
shanerutter

Subserver not working

Recently i have noticed that none of my subservers are working. At the moment it is setup as such

Domains

domain.com test.domain.com

Subservers (domain.com)

secure.domain.com hostiab1.domain.com

test.domain.com might look like a subserver but i have it as a normal server this is becuase it needed its own stuff as if it was a complete domain. The problem is that the 2 subservers just resolve to domain.com. If i make hostiab1.domain.com the defualt for IP then all the domains will work correctly including the resolving of the hostiab1.domain.com.

The only problem is that none of the other subservers will resolve, they just go to domain.com.

Sun, 11/21/2010 - 20:30
Locutus

Heya,

can you explain what you mean with "resolve to domain.com"? It also helps verifying problems if you give the actual domain names instead of dummies. I imagine they're not secret if you publicly serve them? :)

Mon, 11/22/2010 - 02:18
shanerutter

Domains are:

shanerutter.co.uk jproctor.shanerutter.co.uk

Subservers are: hostiab1.shanerutter.co.uk (this is the defualt IP as well) secure.shanerutter.co.uk

If you test shanerutter.co.uk and jproctor.shanerutter.co.uk you will see that it loads correctly. If you browse to hostiab1.shanerutter.co.uk it loads correctly. But secure.shanerutter.co.uk and any of subserver of shanerutter.co.uk will not load it will just go to shanerutter.co.uk.

How ever if i make the subserver as a main server it will load but i want them as subservers not as there own server with there own accounts and such.

Mon, 11/22/2010 - 04:53
Locutus

Okies, as expected all those domain names "resolve" (as in nameserver lookup) to the same IP address.

Does "secure" imply that you're using SSL for that site?

If an Apache virtual host does not load but shows the default instead, it usually means that the vhost configuration is somehow wrong. When you go to Webmin -> Servers -> Apache Webserver, which vhosts does it show you and on which ports? Check the address, port, server name and document root there. You might also post a listing of the domain list here, enclosed in   tags for better readability.

Mon, 11/22/2010 - 06:11
shanerutter

Yes they all resolve to the same IP this is correct. And yes it will be SSL but at the moment its is not whilst i try to get the subservers working correctly.

I have looked in the apache settings and all websites are confgigured to use port 80 and the correct ip address. I have tried removing the subserver and restarting apache multiple times and it will still not work.

I have noticed that if i make shanerutter.co.uk the main ip all subservers and the jproctor.shanerutte.co.uk domains all stop working and just go to shanerutter.co.uk

The servers directory is also correct.

Mon, 11/22/2010 - 06:51
Locutus

The hosts list looks okay, yeah. It's quite odd, since whatever you set as "default server for this IP" should have no influence except when you request an unknown hostname.

Do you have any forwardings, redirections, proxying or similar in place? Can you check the Apache logfiles? Maybe those'll give you some hints. Next step would be taking a look at the Apache config files.

Mon, 11/22/2010 - 07:22
shanerutter

I have enabled Website matches all sub-domains? on all the domains, but when i disable this it dosent seem to fix anythink.

The only errors in the apache logfiles is the ones relating to there being no favicon.ico or robots.txt. There are no forwardings redirections or proxying being used which i no off. If there is then virtualmin has setup these its self.

I have gone through all the domains and cant see anythink.

Mon, 11/22/2010 - 08:57
Locutus

Well, the "matches all sub-domains" definitely was a problem, since it will wildcard all subdomains to the one where you set that.

You may want to double-check that the feature is really turned off everywhere, that Apache is restarted and there's no leftovers of that setting in the Apache config file.

Let me know if you can't figure it out, then I'll do some experiments what this feature effects in the config file, I haven't used it myself so far. :)

Mon, 11/22/2010 - 11:56
shanerutter

I have no disabled the matchesall sub-servers, i also checked through the DNS for left entries. And went through the apache entrys for each server. I removed all teh aliasserver *.domain.com.

I also noticed that there where a bunch of alias server lines with no text after them just blank. I remoebed these and saved it, restarted apache didnt work, restart server didnt work.

Also i want to make shanerutter.co.uk the main domain for the IP as well, but if i do it just wont let any domains or subservers such as jproctor.shanerutter.co.uk work and will just load up shanerutter.co.uk.

Mon, 11/22/2010 - 13:12
Locutus

Okay... I'm afraid I'm a bit out of ideas here, short of taking a look at your Apache config files myself. I'm somewhat doubtful though that you'd want to give me the necessary access to your system. :)

Mon, 11/22/2010 - 15:11 (Reply to #10)
shanerutter

If i emailed you my httpd.conf could you look through it for possible errors?

I have tried nemerous things and just cant seem to get it working.

Mon, 11/22/2010 - 15:39
shanerutter

Thank you very much for your help "Locutus", i have now managed to fix this problem. I dont no exactly what how i fixed it all i no is that i reapplied the "match all subservers rule" then manualy deleted it from the dns and httpd.conf and then it worked.

Instead of making a new post i will post the problem i am having now. My website runs on ip address 94.76.201.162, is it possible to have a subserver run on IP 94.76.201.161, i have made the subserver and specified the IP, it has made the apache settings and dns settings for it but it dosent work.

The reason for this is becuase i want the secure.shanerutter.co.uk to have a ssl certificate.

Mon, 11/22/2010 - 15:58
Locutus

Okay, good the one thing is resolved. :)

As for your new problem: What exactly "does not work"? Can you elaborate please what you did and what happened? In general it's sure possible to operate a sub-server on a different IP address.

Mon, 11/22/2010 - 18:00
shanerutter

My main domain

shanerutter.co.uk uses ip address 94.76.201.162

I want to create a subserver (secure.shanerutter.co.uk) which operates on ip address 94.76.201.161.

I have created the subserver which you can browse to by going to

http://94.76.201.161 https://94.76.201.161

But if you try browsing to secure.shanerutter.co.uk it just loads shanerutter.co.uk.

I have checked and "secure.shanerutter.co.uk" does resolve to 94.76.201.161.

Mon, 11/22/2010 - 18:13
Locutus

Actually, for me the IP address with .161 in the end, and secure.shanerutter.co.uk show the same thing: a directory index with "awstats_icon" and "icon" subdirectories (probably links), while "shanerutter.co.uk" shows a web page with "Shane Rutter - PHP Programmer".

So, from my end, it seems to be working as intended.

Mon, 11/22/2010 - 18:17
shanerutter

Umm tried restarting my pc, refreshing my internet and clearing all cache files. Maby my ISP's DNS servers havent updated correctly yet or somthink?

Thank you for your help, probebly would have still been stuck.

Mon, 11/22/2010 - 19:03
Locutus

Not yet updated DNS servers is a possible reason, yeah. Every entry has a time-to-live. I tend to set those to 30 seconds when I'm in an experimentation phase. :)