Welcome! Log In Create A New Profile

Advanced

Re: Alter Config On Startup

António P. P. Almeida
November 10, 2011 07:32PM
On 10 Nov 2011 16h47 WET, nginx-forum@nginx.us wrote:

> Hello, I have a SSL section in my nginx.conf file and I want to
> start up nginx without SSL enabled. Is this possible without
> removing the SSL info in the conf file?

Yes. You'll have to:

1. Create a script that enables the SSL part. The most viable way
seems to be through the include directive.

2. Reload nginx.

3. Done.

Using sed supposing that you start Nginx without SSL enabled. The SSL
config is in a file sslhost.conf. In the file you have the regular
HTTP config:

server {
# HTTP (no SSL)
}

##SSL include sslhost.conf;


sed -i 's/##SSL //' <vhost config file>

service nginx reload

Now the SSL config is active.

--- appa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Alter Config On Startup

ceh329 November 10, 2011 11:47AM

Re: Alter Config On Startup

António P. P. Almeida November 10, 2011 07:32PM

Re: Alter Config On Startup

ceh329 November 18, 2011 12:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 122
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready