# Alter Config On Startup

**URL:** <https://www.ruby-forum.com/t/alter-config-on-startup/213753>\
**Category:** NGINX\
**Created:** [November 10, 2011, 5:48pm UTC](https://www.ruby-forum.com/t/alter-config-on-startup/213753 "2011-11-10T17:48:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [November 10, 2011, 5:48pm UTC](https://www.ruby-forum.com/t/alter-config-on-startup/213753/1 "2011-11-10T17:48:24Z")

</div>

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:

> **[Alter Config On Startup](https://forum.nginx.org/read.php?2,218180,218180#msg-218180)**
>
> 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

---

<div class="post-metadata">

**Author:** ![ceh329](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/898d66/32.png) [@ceh329](https://www.ruby-forum.com/u/ceh329)\
**Post date:** [November 11, 2011, 1:31am UTC](https://www.ruby-forum.com/t/alter-config-on-startup/213753/2 "2011-11-11T01:31:41Z")

</div>

On 10 Nov 2011 16h47 WET, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![ceh329](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/898d66/32.png) [@ceh329](https://www.ruby-forum.com/u/ceh329)\
**Post date:** [November 18, 2011, 6:45pm UTC](https://www.ruby-forum.com/t/alter-config-on-startup/213753/3 "2011-11-18T18:45:22Z")

</div>

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

Posted at Nginx Forum:

> **[Re: Alter Config On Startup](https://forum.nginx.org/read.php?2,218180,218577#msg-218577)**
>
> 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
