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

Unable to add www as server alias

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
15 posts
  • 1
  • 2
  • Next
pramathesh
Posts: 12
Joined: Mon May 01, 2017 8:38 am

Unable to add www as server alias
  • Quote

Post by pramathesh » Sat Feb 17, 2018 9:58 am

Hi,

Using the latest version of VestaCP I cannot seem to add www version of my domain as the server alias. It says changes saved but will not reflect the same upon refresh and thus LetsEnrypt is not issuing the SSL for the www version. Is there a work around? I need SSL on the www version of the website too.
Top

tkramer
Posts: 7
Joined: Thu Feb 15, 2018 12:28 pm

Os: Debian 8x
Web: apache + nginx
Re: Unable to add www as server alias
  • Quote

Post by tkramer » Sun Feb 18, 2018 12:02 am

Helo! You don't have to add www as an alias.

As a best pratice, if you want your server responding accordly with "no-www" specs, you have to create an DNS entry for the www as a CNAME entry... pointing to domain.tld

* add too @ -> domain.tld -> IP as A type record

This way your sites are loaded with or without www on url.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Unable to add www as server alias
  • Quote

Post by tjebbeke » Sun Feb 18, 2018 11:05 pm

pramathesh wrote: ↑
Sat Feb 17, 2018 9:58 am
Hi,

Using the latest version of VestaCP I cannot seem to add www version of my domain as the server alias. It says changes saved but will not reflect the same upon refresh and thus LetsEnrypt is not issuing the SSL for the www version. Is there a work around? I need SSL on the www version of the website too.
what @tkramer is saying is not correct. CNAME is only at DNS level it will not solve the problem that nginx/apache is listing to the www.domain.com domain name.

@pramathesh there is a bug that makes it impossible to add the www.domain.com domain as an alias.
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Unable to add www as server alias
  • Quote

Post by plutocrat » Mon Feb 19, 2018 8:36 am

I'm experiencing this too.

The domain was initially set up without the www. alias. Letsencrypt was set up. All was working. Then the client wanted to add the www alias. Previously this would not be a problem. The alias would be added, letsencrypt would ask for a new certificate including the www domain, and all would be good.

Now, with the latest .19 version of vestacp, it seems this isn't working. You add the www alias, hit save, but when you come back to the domain edit page, the alias has disappeared.
Next we try removing SSL and LE, and saving the domain. Then you add the alias to a plain http domain. Same thing. www alias is not preserved.
Now we try to add another subdomain ... xxxx.domain.com. This ... succeeeds! So it seems to be prejudiced against www.
Having added the xxx domain we can go to $VESTA/data/users/username/web.conf and edit it so that xxx becomes www. Then we rebuild web config ... haha! We've fooled it into accepting the alias, which appears in the config, and also in the web interface.
However, now we are unable to add LE SSL. It fails with "Error 2". No further information is available in /var/log/vesta/system.log

Soooo, it seems you can have www or SSL but not both. Weird.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Unable to add www as server alias
  • Quote

Post by tjebbeke » Mon Feb 19, 2018 9:58 am

Currently, there is a bug in vesta that you cannot add www.yourdomain.com as an alias.
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Unable to add www as server alias
  • Quote

Post by plutocrat » Mon Feb 19, 2018 10:13 am

"Currently, there is a bug in vesta that you cannot add www.yourdomain.com as an alias."

Seems a bit of a major one! Do you have a bug reference? I was unable to find one. Maybe there is some information in there that will help me resolve it.

Meanwhile, I deleted the webdomain and recreated it from scratch with a www alias and that worked. So new domains seem to be OK. Can't try to add letsencrypt SSL right now as the DNS is pointing back to the original site.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Unable to add www as server alias
  • Quote

Post by tjebbeke » Mon Feb 19, 2018 1:29 pm

I created a pull request to fix it: https://github.com/serghey-rodin/vesta/pull/1490
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Unable to add www as server alias
  • Quote

Post by skamasle » Mon Feb 19, 2018 2:59 pm

This is reported in bug tracker also https://bugs.vestacp.com/issues/614
Top

ByProgrammer
Posts: 2
Joined: Sat Apr 07, 2018 9:38 pm

Os: CentOS 6x
Web: apache + nginx
Re: Unable to add www as server alias
  • Quote

Post by ByProgrammer » Fri May 25, 2018 2:57 pm

I have the same problem and I think that it is an important problem. Are there same news about it??

Thanks
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Unable to add www as server alias
  • Quote

Post by plutocrat » Sat May 26, 2018 5:46 am

It seems to have been fixed. If you're still experiencing it, you can replace your func/main.sh file with the latest one from github

Or make the change manually. Its only a small edit. https://github.com/serghey-rodin/vesta/pull/1490/files
Top


Post Reply
  • Print view

15 posts
  • 1
  • 2
  • Next

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
 

 

Login  •  Register

I forgot my password