Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

ServerAlias does not work

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Messiah
Posts: 74
Joined: Sun Apr 06, 2014 8:47 pm

ServerAlias does not work
  • Quote

Post by Messiah » Wed Sep 10, 2014 8:26 pm

Hello!
Recently I upgraded the code of the portal and added real multilingual support. The best solution I found is a languages on subdomains, pointing to the same file structure and the same scripts to avoid unnecessary copies. I just ordered a new VPS, installed VESTA, added mysql replication.

So, I added my domain, let it be MYDOMAIN.ua, and automatically I got the alias http://www.MYDOMAIN.ua. I added en.MYDOMAIN.ua and pl.MYDOMAIN.ua to the same field immediately (it seems they are separated with a line break)
but I found that only MYDOMAIN.ua and http://www.MYDOMAIN.ua is working, en and pl shows the
default.domain
Powered by VESTA
page. I thought something is wrong and added one more, ua.MYDOMAIN.ua: the same result for all 3 subdomains.

I checked the web server configs:
/home/admin/conf/web/apache2.conf
ServerName MYDOMAIN.ua
ServerAlias http://www.MYDOMAIN.ua en.MYDOMAIN.ua pl.MYDOMAIN.ua ua.MYDOMAIN.ua
/home/admin/conf/web/nginx.conf
server_name MYDOMAIN.ua http://www.MYDOMAIN.ua en.MYDOMAIN.ua pl.MYDOMAIN.ua ua.MYDOMAIN.ua;
I tried to connect to the backend directly, i.e.
http://en.MYDOMAIN.ua:8080/index.php and I got standart
The requested URL /index.php was not found on this server. Apache/2.2.22 (Debian) Server at en.MYDOMAIN.ua Port 8080
Everything seems to be OK in config, so what is the problem?
Top

Messiah
Posts: 74
Joined: Sun Apr 06, 2014 8:47 pm

Re: ServerAlias does not work
  • Quote

Post by Messiah » Thu Sep 11, 2014 2:21 pm

Sorry, I wrote
ServerAlias http://www.MYDOMAIN.ua en.MYDOMAIN.ua pl.MYDOMAIN.ua ua.MYDOMAIN.ua
but I mean
ServerAlias www.MYDOMAIN.ua en.MYDOMAIN.ua pl.MYDOMAIN.ua ua.MYDOMAIN.ua
This is very clever Google Chrome which aded http:// to copy-pasted.

Now I found that only first ServerAlias works, i.e. I changed it to
ServerAlias en.MYDOMAIN.ua pl.MYDOMAIN.ua ua.MYDOMAIN.ua www.MYDOMAIN.ua
and EN started to work. Temporary solution is wildcard, i.e.
ServerAlias *.MYDOMAIN.ua
but I don't know if it will cause problems adding other sub-domains as separate sites, if it depends on the order of VIRTUALHOST directives in the config.
Top

Messiah
Posts: 74
Joined: Sun Apr 06, 2014 8:47 pm

Re: ServerAlias does not work
  • Quote

Post by Messiah » Sun Sep 14, 2014 2:35 pm

this is not confirmed on the other server with the same configuration o_O
Top

kandalf
Posts: 87
Joined: Tue May 13, 2014 11:53 pm

Re: ServerAlias does not work
  • Quote

Post by kandalf » Fri Oct 31, 2014 3:47 pm

I have a similar problem do you found any solution?
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password