HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   How do I create a subdomain? (http://www.howtoforge.com/forums/showthread.php?t=15235)

torqhost 1st September 2007 13:04

How do I create a subdomain?
 
How do I create a subdomain? I am guessing it's the co domain feature, but where do I put the files, that correspond to the subdomain? I don't want to do redirection to folders, I just need it to display a subdomain properly.

Thanks

till 1st September 2007 14:45

Just create a new website. If your subdomain is sub.domain.com, then create a website with:

hostname: sub
domain: domain.com

Every client van have more then one website.

torqhost 1st September 2007 15:13

But how can a client create a subdomain? I think only administrator or reseller can create new sites, but I think resellers will not want to create evey subdomain for customers manually.

till 1st September 2007 15:16

Create a reseller account for your client, if you want that the client is able to create new websites.

Co-domains are subdomains and they can be created by the client himself. But if you want a own webspace for a subdomain, it is a website and not a co-domain and websites can only be created by resellers and the admin.

torqhost 1st September 2007 15:30

Ok, I understand what you mean. But I don't need a subdomain to be a separate website, the settings / limits should be as for the parent website, I just need it to point it to a directory inside the website directory, so if I say, for example wiki.somedomain, I would like wiki to point to wiki directory inside the directory for somedomain. Co-domain however can only forward the url from wiki.somedomain to somedomain/wiki. So there is no way to just make it point to a directory and keeping parent settings, but a website needs to be created.
An I correct in my understanding now?

Thanks for your help.

till 1st September 2007 15:35

You can do this with custom rewrite rules.

http://www.howtoforge.com/forums/showthread.php?t=12783

ataman79 21st February 2008 14:10

Quote:

Originally Posted by till
Just create a new website. If your subdomain is sub.domain.com, then create a website with:

hostname: sub
domain: domain.com

Every client van have more then one website.

Ok I create a new website just like you said. My domain is www.domain.com and i deicide to create subdomain test.domain.com, but now when I type the command : ping test.domain.com - it tells me that could not find host test.libra-ag.com

Where is the problem ? :confused:

falko 22nd February 2008 17:45

Please check if the DNS record for test.domain.com is correct. You can check that like this:
Code:

dig test.domain.com

make-fun 23rd February 2008 00:32

Quote:

Originally Posted by till
You can do this with custom rewrite rules.

http://www.howtoforge.com/forums/showthread.php?t=12783

Hi Till,
I've been reading all the info on subdomains — including people wondering if it could be implemented in ISPConfig to have "permanent" subdomains without adding the "RewriteEngine Opton" manually, using this option Co/sub-domains without rewritten

Here's what I was planning on doing about it myself…
I was going to simply add a prefix to the name of the "subdomain" as I insert it into the HOST inputfield.
Like this:
Host: perma_mysubdomain
Domain: example.com

Then add a little switch with something like
PHP Code:

if(substr($domain["domain_weiterleitung"],0,6) == "perma_"){
// remove the prefix
// then change the $rewrite_rule by removing the [R]
$rewrite_rule .= "\nRewriteRule   ^/(.*)$  http://".$servername.$domain["domain_weiterleitung"]."$1 ";


in /root/ispconfig/scripts/lib/config.lib.php around ~ line 1374

So there'd be no big changes within the DB or so, the "Prefix-Option" could just be added as a simple text hint next to the input field "Host:"
Or, to make it nice and simple… at some time in future, be done with a set of radio buttons or what ever…

Any thoughts on that Till — I've not done it jet, it was rather some brainstorming so far

Cheers


All times are GMT +2. The time now is 20:56.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.