Sub domain help

I am trying to setup a subdomain, but it is not working. I am not sure where I am messing up.

I want forum.domain.com instead of domain.com/forum

I created a subserver under the alias of the chosen domain, but the page does not come up.

Can anyone please provide me the correct steps?

Virtualmin Pro

A subdomain is just a name (and I hate cPanel for using the term to mean something wholly different than a name, because it has confused legions, because it is simply a nonsensical use of the term).

First up, see our guide for recovering cPanel users here:

http://www.virtualmin.com/documentation/id,virtualmin_for_cpanel_users/

And, then, think about whether you really want a cPanel-style sub-domain. They’re a bit dumb, but if you’re really more comfortable with them…there is cPanel style “subdomain” support in Virtualmin.

Anyway, let’s get on with your specific question…I’m not actually sure what steps you’ve taken, as the terms “subserver” and “alias” don’t mix. A subserver is a wholly new virtual server that is owned by a parent virtual server (and their names don’t matter, but in many cases it will be a subdomain name). An alias is a “parked domain” in cPanel parlance…it’s a domain name that points to another virtual server and has no content of its own. You can’t have both answering on the same domain name.

The way I would setup forum.domain.tld would be to create a Sub-server of domain.tld named forum.domain.tld, and then install whatever forum software I wanted to use into the base directory (when using the Install Scripts interface, you have an option of installing into a sub-directory or into the base directory). This will work fine, and offers quit a bit of flexibility that cPanel "subdomains" do not.

If you really really want it to act like a cPanel subdomain, then you’ll want to edit the Module Configuration, and find the option labeled “Allow creation of sub-domains?” in the “Defaults for new domains” section. Set it to Yes. There is no functionality provided by “sub-domains” that is not possible with sub-servers (in a more flexible, and cleaner way), but if familiarity is more important, you can enable it. This will put the content into a subdirectory of the public_html of the parent server, just like in cPanel.

I tried doing what you suggest, but I ended up with forum.domain.com/forum.

These are the steps I took.

Log in as root > Choose domain > Create Server > Sub-Server > "Domain name" forum.domain.com > Create Server

I left everything default for simplicity.

Install scripts > Selected script > Show Install Options > "Install sub-directory under public_html" (I have tried leaving it to the default name and putting in smf.domain.com)

I choose top level, but it warns of overwriting files and I do not want to do that.

Where am I going wrong?

I choose top level, but it warns of overwriting files and I do not want to do that.

Yes, in this case you do. :wink:

The overwriting of files is if you uninstall the application…but, since this is a dedicated virtual server just for the forum, no harm in deleting everything if you uninstall the application.

The other alternative is to install it into a “forum” subdirectory and use a proxy rule to point to the forum. But it’s simpler just to put it in the root–that’s what we’ve done with Virtualmin.com and its Joomla instance (technically it’s a bit more complicated than that, but the principle is the same).

The layout is now correct, but the page will not load.

I am going to add a new cname to see if that solves the problem.

Adding cname solved the issue.

I have looked everywhere for this and if I missed it I am sorry and I hope that someone has an answer. I have a test server setup with virtualmin on my local network and I want to go to that machines ip and domain name to pull up the domain like http://10.20.30.90/domain I have one virtual server created and this works after I added in a directory alias /domain to the /home/domain/public_html file. I did this for a second virtual domain and it does not work. I have compared each settings in http.conf and everywhere I can think of and it will not pull up by going to http://10.20.30.90/seconddomain If I put a host entry that associates the server IP with a name and use the name to go to the seconddomain it will come up. I guess this is a DNS issue of some kind on the virtualmin machine. This is on the local network and not open to the outside world so I please understand security is not an issue just understanding what the problem is.

Thanks
Damien

Same here. I posted a solution that worked for me at: https://www.virtualmin.com/node/9546

Search for the comment posted on June 26, 2009 and titled “Solution - Edit sub-server template”.