Ubuntu 16.04 LTS
Latest .19
Apache / nginx config
https://forum.vestacp.com/viewtopic.php?f=11&t=16219
Try removing SSL and LE, and saving the domain. Then you add the www alias to a plain http domain. Same result
Try with a different subdomain ... xxxx.domain.com. This ... succeeeds! So it seems to be prejudiced against www.
Try editing $VESTA/data/users/username/web.conf and edit it so that xxx becomes www. Then we rebuild web config. Alias, 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
Tried running command line versions which appear in the system.log. Same result. At what point does the alias get passed to letsencrypt servers?
v-add-web-domain-alias 'user' 'domain.com' 'www.domain.com' 'no'
v-list-web-domain user domain.com | grep ALIAS
ALIAS: (blank)
Confirm issue.
OS: CentOS 7
Vesta CP version: 0.9.8 (x86_64) release 19
Installed Software: nginx + php-fpm
Also found that v-update-web-templates for problem domains is remove aliases as well. v-change-web-domain-name doesn't help at all.
Fixed it by:
$VESTA/func/main.sh as it done in pull request #1490 v-update-web-templatesError: Web alias example.com exists. To fix this. I opened $VESTA/data/users/{USERNAME_FOR_DOMAIN}/web.conf and removed all found www.example.com domains in config.UPD 22.05.2018
More stable and faster solution.
$VESTA/data/users/{USERNAME_FOR_DOMAIN}/web.conf and add www.domainname.com to ALIAS variable.v-update-web-templates {USERNAME_FOR_DOMAIN}.@Niklan Hi Nikita,
Can you please explain me how do I get to $VESTA/data/users/{USERNAME_FOR_DOMAIN}/web.conf ?
I cannot find web.conf anywhere :(
Where is $VESTA? is the solution for pre-install or arlready on installed?
Thank you
@klukiyan $VESTA is variable that's exists by default and directs to vesta's folder /usr/local/vesta. You can just simple replace it. /usr/local/vesta/data/users/{USERNAME_FOR_DOMAIN}/web.conf and {USERNAME_FOR_DOMAIN} must be replaced by username that own broken domain.
This files and folders are available for sudousers only. So before trying to get there or edit something, enter sudo su for admin or login as root, after you do you job, enter exit to prevent permission problems from root.
You can edit it whatever you like. vi PATH, nano PATH, or whatever you use. I preffer Midnight Commander and use mcedit PATH (this is require to install mc package`).
changing web.conf only fixes support for http
https://www.domain.com gives error on certificate doesn't include www :(
@Niklan's solution also works for Ubuntu.
Confirm issue.
OS: CentOS 7
Vesta CP version: 0.9.8 (x86_64) release 19
Installed Software: nginx + php-fpmAlso found that
v-update-web-templatesfor problem domains is remove aliases as well.v-change-web-domain-namedoesn't help at all.Fixed it by:
- Edit
$VESTA/func/main.shas it done in pull request #1490- Run
v-update-web-templates- I also got new error when trying to add alias
Error: Web alias example.com exists. To fix this. I opened$VESTA/data/users/{USERNAME_FOR_DOMAIN}/web.confand removed all found www.example.com domains in config.- Add alias, all works fine.
UPD 22.05.2018
More stable and faster solution.
- Edit
$VESTA/data/users/{USERNAME_FOR_DOMAIN}/web.confand addwww.domainname.comto ALIAS variable.v-update-web-templates {USERNAME_FOR_DOMAIN}.
Bad fix, because after changing main.sh, new domains are created with two aliases www.domainname.com, www.domainname.com
any idea to fix this? I really need it badly for www...
I did it using ssh in mind conf somewhere.
Can't remember, but find it by googling
On Mon, Sep 21, 2020, 07:12 Benyamin Limanto notifications@github.com
wrote:
any idea to fix this? I really need it badly for www...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/serghey-rodin/vesta/issues/1489#issuecomment-695902998,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGTQZ62WLOGBTLSJGRII2P3SG3OEFANCNFSM4ERI3EHQ
.
https://github.com/serghey-rodin/vesta/commit/74fa6d5b0ce78cbb85ea657d16f8f2c3dba93c6c
In func.sh, around line 900, find
aliases=$(echo "$aliases" |grep -v www.$domain |sed -e "/^$/d")
and edit it to read
aliases=$(echo "$aliases" |sed -e "/^$/d")
Make a backup first!
74fa6d5
In func.sh, around line 900, find
aliases=$(echo "$aliases" |grep -v www.$domain |sed -e "/^$/d")
and edit it to read
aliases=$(echo "$aliases" |sed -e "/^$/d")
Make a backup first!
Is it working also on ubuntu? Also after that I only need to un check ssl->save web->check ssl->save web again right?
It shouldn't matter what distro you use it on, as its only using bash commands. Make a backup of the script. Try it. If it doesn't work, restore the backup.
Most helpful comment
@klukiyan
$VESTAis variable that's exists by default and directs to vesta's folder/usr/local/vesta. You can just simple replace it./usr/local/vesta/data/users/{USERNAME_FOR_DOMAIN}/web.confand{USERNAME_FOR_DOMAIN}must be replaced by username that own broken domain.This files and folders are available for sudousers only. So before trying to get there or edit something, enter
sudo sufor admin or login as root, after you do you job, enterexitto prevent permission problems from root.You can edit it whatever you like.
vi PATH,nano PATH, or whatever you use. I preffer Midnight Commander and usemcedit PATH(this is require to installmcpackage`).