HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   How Subdomain works (for documentation) (http://www.howtoforge.com/forums/showthread.php?t=38318)

moglia 19th August 2009 01:39

How Subdomain works (for documentation)
 
:confused: I will starts produce of end user documentation anyone can explain how subdomain works im looking at apache alias points subdomain for the same document root of main site.

Host
DOMAIN
REDIRECT TYPE - No Redirect - No Flag - R - L - R,L
PATH

Active - Y

I need explanations how REDIRECT TYPE works.
itīs possible create a independent virtualhost for subdomain?
(see workarround)

How subdomain can use another document root.

domain inclusion creates folders: cgi-bin log ssl tmp web

subdomain can use a folder like: subdomain name?

at the same level of web (document root)

cgi-bin log ssl tmp web subdomain

The main question is can specify another document root for subdomain?

If not possible specify a subdomain document root i no see any diferences between server alias and subdomain.

i think alias can redirect one domain to another using virtual redirect. one domain to another.

My workarround i created subdomain as independent website.

My idea is create subdomain with another document root with the same virtual hosting settings. share setting (main domain and subdomain).

till 19th August 2009 09:37

Quote:

My workarround i created subdomain as independent website.
This is no workaround, it is the intended way of doing it. If you want a website, create a website. It does not matter for a website if a domain is a.com a.a.com or a.a.a.com

Quote:

If not possible specify a subdomain document root i no see any diferences between server alias and subdomain.
The difference is very easy. An alias domain can be any domain while a subdomain can just be a subdomain. This is a often requested feature and separation from hosters as many of them allow free subdomains but not free alias domains.

trondhuso 5th April 2010 00:14

Quote:

Originally Posted by till (Post 201448)
This is no workaround, it is the intended way of doing it. If you want a website, create a website. It does not matter for a website if a domain is a.com a.a.com or a.a.a.com



The difference is very easy. An alias domain can be any domain while a subdomain can just be a subdomain. This is a often requested feature and separation from hosters as many of them allow free subdomains but not free alias domains.

To make it even more obvious:
With an alias you can do this:
main domain: example.com
alias: example.net (will point to example.com)
alias: example.org (will point to example.com)
alias: domain.com (will point to example.com)

To till:
What people are reacting to is how subdomains are created.
Example:
(probably a typical one): blog.domain.com
The way ISP Config 3 wants us to do this by using the sub-domain menu, it will actually be the same as: www.domain.com/blog
Which sometimes is OK, unless you would like to have a subdomain like test.domain.com where you want to test your application with a different setting.
In Plesk they do it like this:
directory-structure:
-domain.com
--web
--subdomain
----test
------web
And the information regarding the subdomain is found in the vhost-file for the domain.

You should probably ask users how they implement sub domains. if it is the www.domain.com/test eq test.domain.com then do no changes.
If it is that people go and create a new website as test.domain.com, then I would consider changing the way ISP Config handles sub domains.
I for one support the latter as I am often testing out client websites in a sub domain (client.domain.com) before putting them into production (www.client.com).

till 5th April 2010 09:30

There is absolutely no need to change the way ispconfig handles subdomains as you just created the subdomain the wrong way. If you like to have a separate directory for a subdomain, you simply click on new website, enter sub.domain.com into the domain field and click on save.

If you want to test a website before you put it in production, you just click on new website, enter test.cdomain.com into the domain field and click on save. If the site shall go live, you edit the website settings and change test.domain.com to domain.com abd click on save. Thats all.

we_are_borg 12th June 2010 11:21

Quote:

Originally Posted by till (Post 224177)
There is absolutely no need to change the way ispconfig handles subdomains as you just created the subdomain the wrong way. If you like to have a separate directory for a subdomain, you simply click on new website, enter sub.domain.com into the domain field and click on save.

If you want to test a website before you put it in production, you just click on new website, enter test.cdomain.com into the domain field and click on save. If the site shall go live, you edit the website settings and change test.domain.com to domain.com abd click on save. Thats all.

Till if i make a subdomain as a new website i will get the desired effect namely domain.tld and subdomains.domain.tld all with different logins and pass as a bonus. But would this system not break Ajax requests or will Ajax see it as one domain even its split up.

till 13th June 2010 15:31

Quote:

But would this system not break Ajax requests or will Ajax see it as one domain even its split up.
I guess the way a subdomain gets implemented in apache has no influence on ajax, as the client does not know if a subdomain is redirected by a rewrite rule or if its a separate vhost.

Croydon 19th June 2010 16:05

A question regarding this "subdomains" thing has just come up...

The situation is as follows:
Clients have 1 Domain mydomain.com and they shall NOT be able to add further domains like mysecond.com to their ispc account - so I have to limit the web-domain thing to 1.
BUT: The clients shall be able to add subdomains like happywith.mydomain.com with separate login data and root path.
This is not possible with the Subdomain function of ispc and as the website limit is set to 1 - not possible with the add website function either.
If I raise the website limit to 5 to allow such subdomains - users could add external domains to their account.

Is there any solution for this?

till 19th June 2010 22:14

In SVN you find a domain module which allos to restrict the domains for websites by the admin user.


All times are GMT +2. The time now is 08:53.

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