Subdomain added via control panel is showing main domain's pages.

Asked by Ben Sumner on 2013-09-10

I just added a subdomain via "Add Subdomain" on the main domain's dashboard. I named it "minecraft"

It said it added successfully. When I click "List Subdomains" I get

Reseller:
PanelUserName: admin
Subdomain: minecraft
HomeDir: /var/www/vhosts/wacomalt/wacomalt.com/httpdocs/subdomains/minecraft
FTP UserName:
Comment:

It appears to be added correctly but when I type in http://minecraft.wacomalt.com/ I get my main domain's content.

I have not added or edited any DNS or HTTP configurations as I do not know how, and this is supposed to be automatically by the control panel.

What am I missing? I have already tried to run "Synchronize Domains" and "Reload DNS Zones" I am on EHCP 0.30.9 and Ubuntu 10.04

Question information

Language:
English Edit question
Status:
Answered
For:
Easy Hosting Control Panel for Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2013-09-10
Last reply:
2013-09-11
Phillip Beckford (budgierless) said : #1

Hi, that is an old issue that iPhone was fixed, but Katie it still exists, no, actually I think it is fixed in version 0.32, Try adding one more subdomain then deleting it again, then try your current subdomain and see happens and let me know?

Sent from my iPhone

On 10 Sep 2013, at 03:11, Ben Sumner <email address hidden> wrote:

> New question #235432 on Easy Hosting Control Panel for Ubuntu:
> https://answers.launchpad.net/ehcp/+question/235432
>
> I just added a subdomain via "Add Subdomain" on the main domain's dashboard. I named it "minecraft"
>
> It said it added successfully. When I click "List Subdomains" I get
>
> Reseller:
> PanelUserName: admin
> Subdomain: minecraft
> HomeDir: /var/www/vhosts/wacomalt/wacomalt.com/httpdocs/subdomains/minecraft
> FTP UserName:
> Comment:
>
>
> It appears to be added correctly but when I type in http://minecraft.wacomalt.com/ I get my main domain's content.
>
> I have not added or edited any DNS or HTTP configurations as I do not know how, and this is supposed to be automatically by the control panel.
>
> What am I missing? I have already tried to run "Synchronize Domains" and "Reload DNS Zones" I am on EHCP 0.30.9 and Ubuntu 10.04
>
> --
> You received this question notification because you are a member of ehcp
> Developers, which is an answer contact for Easy Hosting Control Panel
> for Ubuntu.

Jason Brooks (jasonbbrooks) said : #2

Hello,

I had this problem myself, posted a bug report, and a fix was set up in the source.

The trouble originates in how apache serves virtual hosts. EHCP puts together the apache configuration in the order each domain was added. However, apache serves virtual hosts in the order defined, not whether a subdomain "ought" to take precedence. For example: the following domains defined:

mu.example.com
example.com
test.example.com

In apache, if the virtual hosts are defined in this order then connections to "test.example.com" will be served by "example.com". In order to make this work, the virtual hosts MUST be defined in the following order:

mu.example.com
test.example.com
example.com

The trick is getting EHCP to build the configuration file in the correct order.

==============

The current solution is: (copied from bug #1166898)

choose the domain that should reside last,
click settings below, right of screen, (settings of domain, currently single item)
put a large value in "theorder" setting. (currently single item here)
click submit.

your that domain will reside last in config, if everything goes right.

==============

My code will try and create values for "theorder" automatically.

--jason

Can you help with this problem?

Provide an answer of your own, or ask Ben Sumner for more information if necessary.

To post a message you must log in.