Author Topic: Problem with AutoSSL messing with my nginx vhosts settings  (Read 7452 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Problem with AutoSSL messing with my nginx vhosts settings
« on: August 19, 2020, 04:10:55 PM »
Hello,

New user here, hope I'm posting in the right forum and all that.

I have a problem with SSL in CWP, using nginx as my main Web server. Each time a certificate is renewed, be it manually from CWP's appropriate page or automatically using AutoSSL, my per-vhosts nginx conf files are modified.

Indeed, in /etc/nginx/conf.d/vhosts, I have several vhosts conf files that contain, among other things, the following lines:

Code: [Select]
server {
listen *:443 ssl http2;

the "listen *" is necessary because my server is NATed by my cloud provider. Listening only via the public IP does not work.

It also contains some specific config lines necessary for Drupal's "clean URLs" to work.

 Yet, each time a certificate is renewed, the corresponding vhost config files are regenerated to their default settings, with these lines reverted to :

Code: [Select]
server {
listen 51.xx.xx.xx:443 ssl http2;


(where 51.xx.xx.xx is the public IP of my server). Thus, nginx stops listening properly for the corresponding domain/subdomain and everything falls apart. Plus I have to reenter the Drupal-compatibility workaround lines in each vhost.

Is there a way to fix that?

Thanks in advance!

Offline
*****
Re: Problem with AutoSSL messing with my nginx vhosts settings
« Reply #1 on: August 21, 2020, 04:57:10 AM »
Open a ticket to developers with detailed information about the issue.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: Problem with AutoSSL messing with my nginx vhosts settings
« Reply #2 on: August 21, 2020, 11:46:35 PM »
using * is a bad config, you need to set up NAT networking in cwp and that will give you a properly configured server.

http://wiki.centos-webpanel.com/default-page-displayed-for-all-domains
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Problem with AutoSSL messing with my nginx vhosts settings
« Reply #3 on: August 22, 2020, 11:30:22 PM »
using * is a bad config, you need to set up NAT networking in cwp and that will give you a properly configured server.

http://wiki.centos-webpanel.com/default-page-displayed-for-all-domains

Even if I solved this part, it would still remove my drupal-specific lines of config each time, making most of my websites unaccessible due to non-functioning clean URLs.

Offline
*
Re: Problem with AutoSSL messing with my nginx vhosts settings
« Reply #4 on: August 22, 2020, 11:35:04 PM »
you need to use templates, you can't do manual edit.... all this is on cwp wiki:
http://wiki.centos-webpanel.com/webservers-vhost-templates
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Problem with AutoSSL messing with my nginx vhosts settings
« Reply #5 on: August 23, 2020, 03:25:41 AM »
Oh wow! So I need to make a handful dozens of templates, each used once, and also there's a conf editor but it should never be used because any change made in there will be overwritten at the first occasion anyway.

Is it really just me, or is it less than ideal, as far as straightforwardness is concerned?

Offline
*****
Re: Problem with AutoSSL messing with my nginx vhosts settings
« Reply #6 on: August 23, 2020, 09:33:16 AM »
Oh wow! So I need to make a handful dozens of templates, each used once, and also there's a conf editor but it should never be used because any change made in there will be overwritten at the first occasion anyway.

Is it really just me, or is it less than ideal, as far as straightforwardness is concerned?
that is why we've template option to retain any changes when vhost rebuilded