Re: Enabling ngx_http_addition_module on OpenBSD?

2018-06-28 Thread Marc Peters
On Thu, Jun 28, 2018 at 10:26:12AM +0300, Özgür Kazancci wrote:
> I don't want to build Nginx from source. I cannot do that - it's a
> production server.
> 

If this server is that important, that you can't afford the downtime
for a restart (to load the new binaries), you should consider a
loadbalancer and a second nginx, which you can update. If you update the
other, the loadbalancer should recognize and don't forward any traffic.
If you don't have machines for this, you could even do it on the same
machine. Setup a local loadbalancer and two nginx instances to
loadbalance. If the hardware dies, you will have your downtime anyways.
But remember: Every downtime is your maintenance window ;).

hth,
Marc



Re: Enabling ngx_http_addition_module on OpenBSD?

2018-06-28 Thread Richard Toohey

On 06/28/18 19:43, Stuart Henderson wrote:

On 2018-06-28, Özgür Kazancci  wrote:

I need to use "add_before_body" and "add_after_body" directives for Nginx
for my personal webpage, by setting them in nginx.conf. However, it seems
that my Nginx installation (from OpenBSD packages) doesn't support these
directives:

a 'cat' to log file reports;

"2018/06/28 09:14:09 [emerg] 52287#0: unknown directive "add_before_body"
in /etc/nginx/nginx.conf:162"

These directives probably belong to the module: ngx_http_addition_module. So,
is there any way to dynamically activate that module without manually
fetching and compiling Nginx on the system?

I don't want to build Nginx from source. I cannot do that - it's a
production server.
Not sure how much work would be involved ... but I think that you could 
build and test on a machine set up as per your production machine?


Then copy across the binary file(s).

The module selection is part of the nginx build system - you can't do
this without building nginx.






Re: Enabling ngx_http_addition_module on OpenBSD?

2018-06-28 Thread Stuart Henderson
On 2018-06-28, Özgür Kazancci  wrote:
> I need to use "add_before_body" and "add_after_body" directives for Nginx
> for my personal webpage, by setting them in nginx.conf. However, it seems
> that my Nginx installation (from OpenBSD packages) doesn't support these
> directives:
>
> a 'cat' to log file reports;
>
> "2018/06/28 09:14:09 [emerg] 52287#0: unknown directive "add_before_body"
> in /etc/nginx/nginx.conf:162"
>
> These directives probably belong to the module: ngx_http_addition_module. So,
> is there any way to dynamically activate that module without manually
> fetching and compiling Nginx on the system?
>
> I don't want to build Nginx from source. I cannot do that - it's a
> production server.

The module selection is part of the nginx build system - you can't do
this without building nginx.