Derek Bannard's picture

I have a wierd issue with the Turnkey Linux Wordpress server.

I'm in the Apache server area, and I make a virtual host using a valid domain, I can get it to work with no issue, however any subdomains off of that domain will also show up on the page associated to the domain.

Basically I create a virtual host "testdomain.com".  This primary domain works, however if I browse to any valid subdomain like "webmail.testdomain.com", "ftp.testdomain.com" and so on.  They all go to the website for "testdomain.com".  No errors like you would expect or anything going to the default catchall virtual host that came with the system.

In the past I've installed and used Apache 2 with virtual hosts and haven't seen this before.
Any help would be appreciated.

Forum: 
Andu's picture

have checked your DNs records?? Look for a wildcard entry...


Derek Bannard's picture

I have an M$ DNS server running on the local LAN and have checked it for wildcard addresses, none are present.

I have also tested from another network and the same thing happens.

Derek Bannard's picture

Any other ideas? I would like this to work if possible. I don't want to move back to IIS if I can help it.
Liraz Siri's picture

I've seen this behavior myself. If you have any wildcards in the virtualhosts configuration it can be difficult to prevent virtualhosts from popping up where they shouldn't be. Try using explicit IP addresses and ports instead. For example:

Bad: MameVirtualHost *
Good: NameVirtualHost 192.168.1.1:80

Bad: <VirtualHost *>
Good: <VirtualHost 192.168.1.1:80>

Does this do anything for you?

Derek Bannard's picture

I created a new folder with a test html file in it and added another virtual host into the mix.

I changed all virtual hosts to use the explicit IP and they all went to the new Virtual Host I created.  Odd I thought, so I changed the hostname lookup to "Yes", from "Default" and the apache virtual hosts all broke.

The test vhosts were all running on port 80, and yes I did give them unique names that are WWW available and pointing to my routers IP.

I had to command-line in and change the file manually to get it back up.

I've had Apache 1 and Apache 2 vhosts setup on windows boxes with no problems.  This is confusing me cause it looks like it works, and the GUI shows me that all the correct options are in place, but still it doesn't work.

All I need is for it to do a simple redirection to my other server on a different port.  Easy enough to do, but cannot unless I have vhosts working.

It's late and this is frustrating me now.  Maybe I'll wipe the virtual machine and start fresh again.
Might see something new after a good nights sleep... or not.

If someone has made this work by modifying a default install of Apache 2 on Turnkey Linux, I would be grateful to know what was done to make it work.

Thanks.

Derek Bannard's picture

Just wanted to say... couldn't get it working.

I even had a unix admin from work come by and give it a try.  Never seen him get upset at something before... was kind of funny.  Needless to say, he was unable to make it work and couldn't figure out why it was happening.  His suggestion at the end was to build a new box from scratch.  That kinda defeats the purpose of someone as novice as myself with Linux trying to make it work.

Anyways, I'm dropping this and going back to IIS, or Apache on Windows Server.  Those I can get working without having to do what equates to brain surgury, on this appliance.

Sorry, guess this sounds really mean, but it's been a frustrating 2 months trying to make this work with no forward momentum.  I'm upset with the time I've put into this with nothing to show from it.

I'm sure this will work great for someone who doesn't want to stray from the primary intention of the appliance.  We all know Linux users don't like to try new and exciting things with their kernel code.  cool

 

Later.

Derek Bannard's picture

Neing a DNS administrator for numerous rears, I can assure you it's not the DNS.  Now that being said, DNS is usually the root of many of these types of problems.

I have made sure to the best of my ability that the DNS is not the cause.

I've never cleared caches so many time, on the DNS server and locally, than I did while testing.

The forum was the first place I searched for this issue, and google the second.  I came across many posts suggesting it to be a DNS issue, and only a few seem to be having actual issues with their DNS.

DNS has been checked, and is not the issue in this case.  cool

 

I would appreciate if you could try it out and see if you have better luck than I did.  Would be great to know it can be done.
I don't like giving up, and while I did make an effort to get it working, this is giving up to me.  Not a good feeling I must say.

Liraz Siri's picture

I wish we could magically fix everyone's issues but the truth is getting everyone's usage scenarios to work out of the box is pretty much impossible. If we all pitch in then with enough community effort we can cover most of the common issues but that requires people to think a bit beyond their own immediate needs and pitch in on things such as documentation for the greater good...

From another angle dealing with these sorts of issues can be be very frustrating / humbling, but if you stick at it you probably will eventually figure it out and this is the sort of thing you will learn the most from. I can totally relate though to people who don't have the patience for that and just want to move on to something else. Unfortunately, this is the frame of mind that is least conductive to problem solving in my experience. I find bugs are most easily solved with a curious / exploring mindset where you aren't battling both the bug and your ego at the same time.

Derek Bannard's picture

I can easily understand where you're coming from.  If we can produce a product of any kind that has no issues, problems or bugs, then this would be a very boring place to live in my friend.

But since this is not that wonderland where everything is perfect, problems do arise.  There are a lot of people that can dedicate the time and resources in resolving the issues, and those people are usually either not acknowledged or quickly thanked and passed on by.  While a lot do not make the efforts for recognition, it does make a person feel better in the end.

I am grateful that there are people that make the effort to bring something like this to people such as myself who may never go near Linux, or the software associated to it, because it brings us out of our comfort zones.  With something like this, we can look and see how it was put together and in doing so understand why and how it works.

Liraz, thank you for your suggestions, and time you took to look into this issue I was having with the configuration.  I meant no disrespect towards you or your projects.
I only wished I could understand the underlying technology to better help myself resolve this issue.

No t knowing something upsets me, and I may have unfortunately taken that out on you in my reply.  I am sorry.

That is all I have to say, so hopefully my foot stay away from my mouth in the future.  Likely not, but a guy can dream can't he?

 

Liraz Siri's picture

It's natural to vent when you're feeling frustrated. Chucking my computer out the window occasionally crosses my mind too, but I live on a ground floor so I don't know if it counts.

Excuse me for going on a tangent but from what I understand with regards to evolutionary psychology the mammalian brain is hard-wired to pay much more attention to bad things (e.g., threats) than to equivalent good things (e.g., opportunities). When you're a furry creature in the wild that makes sense. You identify what may be a predator, you stop thinking about anything else and go into hyper focus mode to plot your escape.

The trouble we're a long way from the woods, and this strategy doesn't always serve us so well nowadays. When you start thinking about something as a threat you develop a sense of urgency that isn't very conductive to creative problem solving.

So when you come across a problem like this, try not to take it personally. We live in a time when there are vast resources of knowledge under our fingerprints. TurnKey is just a customized version of Ubuntu underneath the hood and there is a wealth of information on Ubuntu even when documentation for TurnKey is lacking. Apache is similarly well documented. If you can't find a solution in all your googling consider asking in other places as well. Apache-related mailing lists, Ubuntu server, etc.

TurnKey is still a small and young open source community in comparison. Good luck!

Add new comment