PDA

View Full Version : subdomains in ispconfig3


ignasigarcia
13th March 2009, 16:48
Hi, I'm trying to understand how subdomains work in ispconfig3. I come from other isp manager where subdomains are treated as ispconfig3's domain (you create one subdomain by typing its URL, the system assigns you a folder to place the web site, and you upload it). So, can anybody help me understand how ispconfig3 works here?

Let's say I want to create a blog.mydomain.com, which is different from www.mydomain.com. So I have created a domain and set in Auto-Subdomain the value www

No I create a subdomain. However, I do not know what values I should set for Domain, Redirect Type (btw, can someone explain what those values mean?), Redirect Path

Thanks very much in advance

Ignacio

till
13th March 2009, 17:31
A subdomain is a alis which points to the same website then the website of the domain. so if you add a subdomain blog.mydomqin.com to the website mydomain.com then blog.mydomain.com pints to the same website folder.

If blog.mydomain.com shall have its own vhost, the simply add a new domain blog.mydomain.com.

atjensen11
14th March 2009, 18:39
I was going to ask a similar question as the original poster as I was struggling with understanding how the subdomain concept works as well.

Like the original poster, I thought the subdomain feature would allow for provisioning different hosts (www, blog, webmail, etc.) in front of a client's domain.

According to Till's response, the subdomain feature creates an Alias domain. If that is true, how is this different than the Alias Domain feature within ISPConfig3? Wouldn't these be duplicates? The input fields are slightly different between the two, but it sounds as though they do the same thing.

Can one of the developers give a scenario of why and when a user would use these two features?

Thanks.

till
15th March 2009, 00:01
Can one of the developers give a scenario of why and when a user would use these two features?

Many hosting providers separate subdomains and other domains in their hosting offers so we have to functions for this to be able to limit them separateley as for a subdomain no additional fees for the registry apply while you will have to register a domain at the registry when it is not a subdomain.

ignasigarcia
16th March 2009, 10:43
ok. I understand that now. However, I've been looking through the forum and documentation on the parameters for Redirection Type and Redirection Path. Could you explain them?

TIA

Ignacio

LightVision
29th March 2009, 12:23
For me, a subdomain is exactly what the word subdomain means: a sub-domain of the domain; and for that subdomain there must be a way to setup a document root in the document-root of the main domain (as a subfolder).

As long as you treat subdomains in that way you do there is no guarantee that another user couldn't register a sobdomain of my domain.

Bad approach plus a waste of resources. Maybe for that subdomain i wouldn't another user to administrate or another e-mail address. Maybe I want to mix the same data for the domain and subdomain in one SINGLE database - with only one root-user and only one password.

What you call subdomain is in fact an alias for redirection and that i could do myself through .htaccess

And, by the way, if you ever change the approach of subdomain, you should inplement as the father's pannel do (you know what i meant)

And because the way you implement the subdomains i couldn't use htaccess to implement it in the correct way.
Tryed in both 2 and 3.

Sory, I am dissapointed but for the moment i have no other options than ispconfig. and i'll choose 2 because interface is esier than 3 (anyway, 3 looks better)
Sorry again.

Horfic
1st April 2009, 12:09
I'm totaly agreeing with LightVision. The subdomain in ISPConfig 3 ist just a alias domain. I know some of the Hoster are doing that what till wrote, but not all. A lot of Hosters are also doing the way what LightVision described.

I would love to see that the ISPConfig Team could also implement this way, because I think its nice to have on main DocumentRoot and in that separate ones for subdomains. So you can access all files with one FTP-ACC.

PS: I'm using at the moment for my Webserver Plesk, and this feature is the major one I use. But I will change to ISPConfig as soon as I have time to make the necessary arrangements for the Transfer.

PPS: :mad:PLESK SUCKS:mad: :DISPCONFIG RULES!:D

till
1st April 2009, 12:11
I would love to see that the ISPConfig Team could also implement this way, because I think its nice to have on main DocumentRoot and in that separate ones for subdomains. So you can access all files with one FTP-ACC.

Just click on new domain and enter in the domain field: sub.domain.com instead of just domain.com and you have a separate web root for your subdomain.

Horfic
1st April 2009, 12:13
Just click on new domain and enter in the domain field: sub.domain.com instead of just domain.com and you have a separate web root for your subdomain.

Yes but not in the main DocumentRoot of my Domain!

till
1st April 2009, 12:17
If you want to have the subdirectory in the same directory then use the subdomain feature of ispconfig plus a rewrite rule to redirect to the subdirectory. thats what the rewrite rukes are for. Simply add a rewrite rule that rewrites to a folder instead of a URL and that does not change the URL in the browser.

Horfic
1st April 2009, 12:20
Thanks that will do it for the time, but it isn't a great solution for a Provider.

LightVision
1st April 2009, 12:45
About rewrite rulles:
Not tested in ISPConfig 3, but in ISPConfig 2 worked after 2 weaks of testings and tones of forums readed.
And when finaly managed to do that, the redirection from non-www to www (canonical) forms of url works only for the main domain, not for sub-domains that i was created in that way.
And the problem was that in non-www url-style was getting always the shared-IP. A big problem for myself

The simplest way to implement that feature is to introduce a new field(for subdomains) which allowed to enter the name of sud-domain and the document root(alway relative to root-document of the domain).

till
1st April 2009, 12:47
This thread is about ispconfig 3 and not 2. Rewrite rules in ispconfig 2 and 3 are different and you can not compare them.

Horfic
1st April 2009, 12:49
The simplest way to implement that feature is to introduce a new field(for subdomains) which allowed to enter the name of sud-domain and the document root(alway relative to root-document of the domain).

That is a good idea!

till
1st April 2009, 13:04
That is a good idea!

The field is already there but you all refuse to use it ;) Just enter the subdirectory and click on save. Thats it, really easy.

See attached Screenshot.

Horfic
1st April 2009, 16:01
Sorry my fault!!!!!!!!!!!

But could you explan this Redirect Type(L, R, LR)

till
1st April 2009, 16:08
But could you explan this Redirect Type(L, R, LR)

This are the redirect "types" from apache.

R: the URL changes to the new path in the browser URL input field.
L: the URL does not change in the browser URL input field.
L,R: Dont remember the exact behaviour of this at the moment. For details take a look at the apache rewrite guide, it should be explained there when to use which type.

CyD
23rd April 2009, 20:00
It was my hope that after configuring a subdomain (including the redirect), the folder that I defined in the 'Redirect path' field would be created in the web root folder. Any thoughts on that?

Thanks!

loge
24th April 2009, 10:51
@CyD

yeah, would love that too. A redirect into the "web" folder of my "owning" domain is ok but not that elegant....

Loge

tedeu
12th May 2009, 06:08
Hy,
I am new to this,
please give some examples so others like me (i am shure i am not allone) could help them selfs here with knoledge !

rukus77
24th August 2009, 22:23
Guys, Till just explained how to use the subdomain feature... Just create the folder manually for now... You have to FTP to the directory to upload your script/files/etc anyway, so create the folder then... Is it that big of a deal?

If it is, make it a feature request and I'm sure they'll get to it if deemed valid/necessary. After all, ISPConfig is free, cut these guys a break! They're doing an awesome job in my eyes.

Mike

thibotus01
3rd October 2009, 12:10
Hi guys,

I'm excpecting a problem, when I use the L Flag.

I'm using already this .htaccess in the web/ folder :

# www
RewriteCond %{HTTP_HOST} !^www\.domain\.tld$
RewriteRule ^(.*)$ http://www.domain.tld$1 [QSA,R=301]

It's redirect the visitor to www.domain.tld if onyl domain.tlf is typed.

So when I create a subdomain, and I go to sub.domain.tld it's always redirect me to www.domain.tld/folder-of-subdomain
Like a R flag

Any idea ? thanks

till
5th October 2009, 11:27
If you use already a custom .htaccess file, dont use the redirect function as it will conflict with your custom .htaccess configuration. Either use your .htaccess file for a redirect or the ispconfig function but not both.

thibotus01
5th October 2009, 11:28
What I did : I put the redirect code from the .htaccess to the domain.tld.vhost after the ispconfig rules. It works fine.
Thank yyou

u4david
5th January 2010, 06:17
ok .So I have been beating my self to up to this point.I know is simple but when something is broken it will not work even it just may be little over look.

so lets start from scratch

My registrar have provided me with domain/s.
This domain/s points to my WAN IP.(tested works fine) Server is loading my home pages of my websites hosted on virtual hosts/one IP.
Do I need to configure any other records there or can Ispconfig3 handle all the a,ns,mx records,sub domains?

If so I can move forward and place my questions regarding DNS/subdomain configuration on Ispconfig3 leaving registrar setting behind from now on.

If NOT so what other records needs to be set-up using registrars resources?

I plane using Ispconfig3 to its full extend but in same time use registrar settings minimally.

Thank you.

till
6th January 2010, 10:32
You dont have to configure anything in the ISPConfig DNS server as you use the dns server of your provider for the domains.

u4david
6th January 2010, 15:31
I know i have the option to use provider for DNS records,I have been using them so far for all mine sub domain/ mx. What I do want is to use DNS build in ispconfig3.
Now I know i have to add custom NS.
Custom NS registers mine domain DNS with registrar.
Ones registered do i also need to change the primary and secondary servers from registrar default to mine custom that i just added.And if I only have one dns server(the one build in ISPconfi3 do I just keep using the second one from mine registrar defaults? Or do i make some sort of Cname for secondary (fake) or do I keep the defaults and add more DNS server with the registrar defaults?

I know it will all take up to 4 days to become usable.As is takes time to propagate.Is there way to speed this up?So testing can be done instantly or least faster?

I would like to understand DNS that is why i would not use registrar DNS records.Just another think to figure out.Love it.

So thanx to all tinkers and geeks for reply.

yoplait
7th January 2010, 21:36
Good evening,

I've got the same problem !

I can't create a subdomain as my DNS provider one... I have always a "server not found" error.
I created a sub directory in the root website, with the good rights, but nothing changes...
I can see that alias do the same as subdomain in ISPconfig, but how to do something which I can use ? (neither R, nor L, nor R and L redirection works at all)
I can't find a really clear explication of the fields of ISPconfig (normal, there's no documentation yet ;) ). Someone can tell me about that ? with an explicit example ?

That would be helpfull :)

Thanks !

till
7th January 2010, 21:38
Your problem is not related to your ispconfig server as you get a server not found error. Theproblem is the dns record for the subdomain at your provider.

yoplait
7th January 2010, 21:50
I didn't declare anything in my provider properties... I have to do so ?
I'll try this so ...

So if I understand :
- I have to declare the subdomain in my provider DNS zone, and then direct it to my server IP,
- And then, in ISPconfig, create a subdomain to the folder (in the root website "web" folder) I want for this subdomain ?

yoplait
7th January 2010, 22:05
Ok, I did it, But now, I have a page redirection error... (but maybe I have to wait more time...)
Does the "path" field must be the absolut path to the sub-folder ?
or web/<sub-folder>/ ?

I'll try tomorrow...