Alter Config On Startup

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?

Thanks,
Charlie

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,218180,218180#msg-218180

On 10 Nov 2011 16h47 WET, [email protected] 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 //’

service nginx reload

Now the SSL config is active.

— appa

Thanks, was not what I was hoping for but I’ll build it in to a startup
script.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,218180,218577#msg-218577

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs