Page 1 of 1

Using SSL without Nginx?

Posted: Wed Jun 28, 2017 12:59 am
by VENAXIS
Hi there,

For some reason I cannot disable Nginx Proxy on my domain and still have SSL enabled this time. If I do that my website shows error 521.

Is it possible to disable Nginx Proxy for a specific domain and still allow it to have SSL support?

Reason: Nginx is eating a lot of RAM and ends up crashing the database eventually. Would setting Swap memory be a better option? If so, how can I do that?

Info: Using CloudFlare and the server is from OVH. On CentOS 7 (64bit), using the latest version of VestaCP 0.9.8 (x86_64).

Re: Using SSL without Nginx?

Posted: Wed Jun 28, 2017 12:22 pm
by gecube_ru
What is the charasteristics of your server?
The nginx usually is the best choice for HTTP server, because of small memory footprint and very fast processing. The only disadvantage is that nginx can't handle dynamic pages (it needs backend server like apache or php-fpm for php processing)

Re: Using SSL without Nginx?

Posted: Wed Jun 28, 2017 5:57 pm
by VENAXIS
gecube_ru wrote:What is the charasteristics of your server?
The nginx usually is the best choice for HTTP server, because of small memory footprint and very fast processing. The only disadvantage is that nginx can't handle dynamic pages (it needs backend server like apache or php-fpm for php processing)
I'm running an eCommerce Wordpress installation on one website. RAM is 2GB with 10GB SSD. I doubt it's something related to the specs as one wordpress installation should not eat that much RAM. I just don't understand why I can't run SSL without Nginx. I want to use Apache only, like I used to be able to before, but if it could be fixed while keeping Nginx that would be good. I'm just trying to find a solution.

Re: Using SSL without Nginx?

Posted: Thu Jun 29, 2017 7:26 am
by gecube_ru
Look.
As I understand cloudflare works as proxy and it needs the server to be configured by some, particular way. So really maybe it is not necessary to use nginx at all.
On the other hand, you can tamper with shttpd.conf and snginx.conf files. To run Apache on 443 port you need to do the next:
1. open templates in /usr/local/vesta/data/templates/web/httpd
2. open templates in /usr/local/vesta/data/templates/web/nginx
3. find your current template and copy it to new one.
4. tpl files is for plain HTTP and stpl for HTTPS
5. Change port settings for nginx and apache servers, i.e. Apache must listen on 443 and nginx on any different port or you will get the conflict.
In templates the port is described as macros (like %proxy_ssl_port%), but you can change it to hardcoded values.
6. Apply template on all your sites to re-generate config files.

Linux is very customizable thing. One needs patience and knowledge to achieve it's targets.

Re: Using SSL without Nginx?

Posted: Wed Jul 12, 2017 1:36 am
by VENAXIS
gecube_ru wrote:Look.
As I understand cloudflare works as proxy and it needs the server to be configured by some, particular way. So really maybe it is not necessary to use nginx at all.
On the other hand, you can tamper with shttpd.conf and snginx.conf files. To run Apache on 443 port you need to do the next:
1. open templates in /usr/local/vesta/data/templates/web/httpd
2. open templates in /usr/local/vesta/data/templates/web/nginx
3. find your current template and copy it to new one.
4. tpl files is for plain HTTP and stpl for HTTPS
5. Change port settings for nginx and apache servers, i.e. Apache must listen on 443 and nginx on any different port or you will get the conflict.
In templates the port is described as macros (like %proxy_ssl_port%), but you can change it to hardcoded values.
6. Apply template on all your sites to re-generate config files.

Linux is very customizable thing. One needs patience and knowledge to achieve it's targets.
Thank you for the detailed answer. This was one of the options I was considering but instead I decided to add a swap disk which solved the issue. A year ago it was possible to disable proxy support for Nginx from within the Vesta control panel without breaking the SSL link, and I was hoping I could do that with this version.