We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
NGINX not working with SSL
Re: NGINX not working with SSL
I believe I found the problem at least for me in my case. I can now get nginx to start. I have not tested with a live domain with ssl.
Iraton was correct but didn't point out what was the original problem. It is helpful to beginners to learn what went wrong than to blindly cut paste code found on the internet.
My new install vestacp has this bug when enabling SSL. Two very minor errors were in the following file.
/etc/nginx/conf.d/vesta.conf
Below is now the correct code:
My second line had the "i" in"include" capitalized AND lacked the end semicolon. Can anyone else confirm?
@zebrahosting correct me if i'm wrong but /home/admin/conf/web/nginx.conf should never have any SSL code in it. that is what snginx.conf is for.
Iraton was correct but didn't point out what was the original problem. It is helpful to beginners to learn what went wrong than to blindly cut paste code found on the internet.
My new install vestacp has this bug when enabling SSL. Two very minor errors were in the following file.
/etc/nginx/conf.d/vesta.conf
Below is now the correct code:
Code: Select all
include /home/admin/conf/web/nginx.conf;
include /home/admin/conf/web/snginx.conf;
@zebrahosting correct me if i'm wrong but /home/admin/conf/web/nginx.conf should never have any SSL code in it. that is what snginx.conf is for.
-
- Posts: 7
- Joined: Sun Nov 15, 2015 7:21 am
Re: NGINX not working with SSL
My vesta.conf file has no errors. (Using the Ubuntu version)
It clearly does not add the right code in the right place when enabling SSH. NGINX is than not able to start. The reverse is also true. When disabling SSH afterwards, I manual remove the SSH line to get it back to working.
I noticed that there was a bug report somewhere so lets hope it gets fixed soon.
It clearly does not add the right code in the right place when enabling SSH. NGINX is than not able to start. The reverse is also true. When disabling SSH afterwards, I manual remove the SSH line to get it back to working.
I noticed that there was a bug report somewhere so lets hope it gets fixed soon.
Re: NGINX not working with SSL
The problem still exist and the reason as some people have pointed out is because it adds the Apache line to the Nginx configuration instead of detecting the webserver and use right configuration.
To solve this, edit the following file: /usr/local/vesta/bin/v-add-web-domain-ssl starting at line 93 to 97
Delete those rows or comment them out and add instead
For anyone wondering, these lines are drafted from the file /usr/local/vesta/bin/v-add-web-domain as starting from line 172 to 180.
I'm not sure where to file the fix for it, so here it is anyways.
To solve this, edit the following file: /usr/local/vesta/bin/v-add-web-domain-ssl starting at line 93 to 97
Code: Select all
# Checking web config
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
if [ -z "$(grep "$conf" $web_conf)" ]; then
echo "Include $conf" >> $web_conf
fi
Code: Select all
# Checking web config include
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
web_include=$(grep "$conf" $web_conf )
if [ -z "$web_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then
echo "Include $conf" >> $web_conf
fi
if [ -z "$web_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then
echo "include $conf;" >> $web_conf
fi
I'm not sure where to file the fix for it, so here it is anyways.
Re: NGINX not working with SSL
Hey if anyone needs a How-To in the future to fix the SSL bug here is a link(youtube) for installing Vesta CP successfully.
The video covers the bug and more, but if you just want a quick fix go to the text tutorial.
Text Tutorial: http://discuss.soulstice.ca/t/install-v ... l-panel/28
Youtube Tutorial:https://www.youtube.com/watch?v=0DNeoATr0Og
The video covers the bug and more, but if you just want a quick fix go to the text tutorial.
Text Tutorial: http://discuss.soulstice.ca/t/install-v ... l-panel/28
Youtube Tutorial:https://www.youtube.com/watch?v=0DNeoATr0Og
Re: NGINX not working with SSL
grenadecx thanks for the fix!
I took the liberty of transforming your fix in a pull request: https://github.com/serghey-rodin/vesta/pull/701
I took the liberty of transforming your fix in a pull request: https://github.com/serghey-rodin/vesta/pull/701