Author Topic: [Solved]Second domain on Zentyal  (Read 3666 times)

przemekz

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
[Solved]Second domain on Zentyal
« on: November 06, 2013, 11:06:13 am »
Hi, I wish use Zentyal as www serwer.
I configured main domain and everything works perfectly.

But I want to add next domain. And I don't now, where can I upload my website?
When I have one domain, I suppose,  /var/www/html. But how can I configure more than one website.
« Last Edit: November 20, 2013, 08:42:49 pm by przemekz »

ctek

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +6/-1
    • View Profile
Re: Second domain on Zentyal
« Reply #1 on: November 06, 2013, 11:17:52 am »
Did you add a second domain in DNS ? If not you wil have to add another domain seconddomain.com.
After that go to webserver and add a new host. www.seconddomain.com
After this, the root folder will be in /srv/www/www.seconddomain.com

Regards.
Bogdan

przemekz

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Second domain on Zentyal
« Reply #2 on: November 06, 2013, 02:08:43 pm »
I add second domain in DNS. But I didn't see in var.

I will check later, now I don't have access to serwer.

christian

  • Guest
Re: Second domain on Zentyal
« Reply #3 on: November 06, 2013, 02:28:04 pm »
Domain, DNS, /var/www/html.... ???

One more example of how confusing this domain word can be when this is in fact matter of virtual host and CNAME (host) entry in DNS.

As ctek rightly explains (and this is another confusing aspect from my standpoint, although in another direction) standard web content is stored in /var/www but vhosts created using Zentyal GUI expect web content to be stored in /srv/www/yourvhost
As far as I understand, there is no need to create any DNS entry but, for what I've experienced few days ago working on another configuration, check twice DNS content as created by Zentyal on your behalf because some IP addresses might be missing for host records.
It also sometimes creates strange domain entries  :-X

przemekz

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Second domain on Zentyal
« Reply #4 on: November 07, 2013, 09:54:08 am »
It strange.

During install, I set external domain. Now I added second.

In var/www/html i have only index.html

I don't have also /srv/www/. I have srv/ftp only

ctek

  • Zen Warrior
  • ***
  • Posts: 197
  • Karma: +6/-1
    • View Profile
Re: Second domain on Zentyal
« Reply #5 on: November 07, 2013, 10:45:39 am »
You will have to add a new host in the webserver section.
Click the add button, add the new name like www.your-second-domain.com and then click save changes
the folder www will be added in the /srv/ folder

Best regards
Bogdan

przemekz

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Second domain on Zentyal
« Reply #6 on: November 07, 2013, 01:34:24 pm »
But what whith DNS, For examle, I added domain pozyczki-olawa.com.pl to DNS (as domain). And when I added pozyczki-olawa.com.pl, zentyal add domain com.pl to DNS.

I don't want to make any mistakes, so its correct, or should I add anly virtual host?? Delete first second domain

christian

  • Guest
Re: Second domain on Zentyal
« Reply #7 on: November 07, 2013, 01:45:42 pm »
I also quickly notice some strange behaviour while remotely installing Zentyal for a friend of mine at the time I configured vhost.

Based on what you describe, if your goal is to reach pozyczki-olawa.com.pl web server, what you have to understand and define is what your DNS domain is.
If your domain is pozyczki-olawa.com.pl, then reaching http://pozyczki-olawa.com.pl is a short-cut from http://whatever.pozyczki-olawa.com.pl
In order to achieve this, DNS must contain a "default" record so that any request not matching any existing A or CNAME is redirected to this default IP.

If you create pozyczki-olawa.com.pl using vhost Zentyal interface (webserver section), then Zentyal is (rightly) thinking that your domain is com.pl while your hostname is pozyczki-olawa

Still you can manually edit DNS content isn't it?

przemekz

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Second domain on Zentyal
« Reply #8 on: November 07, 2013, 01:57:25 pm »
So, when I first add domain in Zentyal and later added virtual host, I have srv/www/domain. And everything is ok. But zentyal created own domain in dns.

Now. I deleted everything. Then I added pozyczki-olawa.com.pl to virtual host. ThEN zentyal created new domain. com.pl. I change name of this domain and I thing everything is ok. Am I right?
 
I am not sure do I correctly understand this: In order to achieve this, DNS must contain a "default" record so that any request not matching any existing A or CNAME is redirected to this default IP.


And I have next question. I have ftp access (with admin passwd) to zentyal. I can open /srv/www/pozyczki-olawa.com.pl. But I cant copy any files (for example via filezilla → 553 Could not create file.) How can I fix permissions/

christian

  • Guest
Re: Second domain on Zentyal
« Reply #9 on: November 07, 2013, 03:05:55 pm »
Now. I deleted everything. Then I added pozyczki-olawa.com.pl to virtual host. ThEN zentyal created new domain. com.pl. I change name of this domain and I thing everything is ok. Am I right?

Starting from scratch (meaning with no vhost nor any domain), if your create pozyczki-olawa.com.pl vhost, then Zentyal will check if domain com.pl domain exists and it doesn't, it will create it then Zentyal will also create host record pozyczki-olawa in this domain.
The only bug here is that host is created without any IP address. I don't know why  ::)
But except adding IP to this host, you don't have to edit anything else.
 
Quote
I am not sure do I correctly understand this: In order to achieve this, DNS must contain a "default" record so that any request not matching any existing A or CNAME is redirected to this default IP.
This is because I suppose my tries to explain difference between vhost (which means virtual host) and domain are unsuccessful. You still want to create "domain" and access "domain" instead of accessing service or server at your domain.
As a result, web browser, while trying to reach your website, will try to find either A record or CNAME matching the leftest part of your URL. As this doesn't exists, name resolution process will return the default IP for the domain.

It works...  ;) this is your own choice and I can understand that your are, like plenty of other people, confused because you are used to think, when you access URL, that the left part is a domain.... side effect of Microsoft literature  ???  I don't know  :-X


And I have next question. I have ftp access (with admin passwd) to zentyal. I can open /srv/www/pozyczki-olawa.com.pl. But I cant copy any files (for example via filezilla → 553 Could not create file.) How can I fix permissions/
[/quote]

przemekz

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Second domain on Zentyal
« Reply #10 on: November 07, 2013, 06:24:05 pm »
Thanks for your help. I'm beginning my adventure with server.

Now I have 2 domains.  Main and pozyczki as host (and in dns as I said). I hope it will be work... ;

przemekz

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Second domain on Zentyal
« Reply #11 on: November 08, 2013, 05:25:18 pm »
Something is wrong.
In my internal network domain works. But I have some errors in external.

I thing i should read more about zentyal and domains...

christian

  • Guest
Re: Second domain on Zentyal
« Reply #12 on: November 08, 2013, 06:18:28 pm »
Perhaps about domain only first. I mean this is not linked to Zentyal implementation.

What do you mean about "external" ?
And what is your problem then ?

przemekz

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Second domain on Zentyal
« Reply #13 on: November 08, 2013, 09:27:08 pm »
When I use pozyczki-olawa.com.pl in my home network, its worked. When I use www.pozyczki-olawa.com.pl in other networks (for example via phone) its doesnt work.

christian

  • Guest
Re: Second domain on Zentyal
« Reply #14 on: November 09, 2013, 12:35:30 am »
From internet, in order to be able to reach http://www.pozyczki-olawa.com.pl, this requires that publish DNS (the one authoritative for pozyczki-olawa.com.pl domain) declares that WWW server (either A or CNAME record) can be reached using your public IP address.
This is the standard (normal) way.

Another alternative approach is to declare, for this domain, default entry that will catch www and also any other "host" to be redirected to your pubic IP (we have discussed this few post above already).

Unless Zentyal domain is authoritative for your domain (this would mean that for your domain ns server is Zentyal) all above stuff has to be maintain in external DNS, not in Zentyal. Most of the time this external DNS is managed by your registrar, with perhaps interface available so that you can do it for your own domain.