# Headers More module is not working in nginx-devel

**URL:** <https://www.ruby-forum.com/t/headers-more-module-is-not-working-in-nginx-devel/244410>\
**Category:** NGINX\
**Created:** [April 6, 2016, 2:43am UTC](https://www.ruby-forum.com/t/headers-more-module-is-not-working-in-nginx-devel/244410 "2016-04-06T02:43:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [April 6, 2016, 2:43am UTC](https://www.ruby-forum.com/t/headers-more-module-is-not-working-in-nginx-devel/244410/1 "2016-04-06T02:43:42Z")

</div>

Hi All,

I’m using FreeBSD with nginx-devel. It seems that this problem is  
lasting  
for a long time (at least start from nginx 1.9.10 ).

Even though I built the source with this module, this module is still  
not  
working.

After add below configuration into http {},  
more\_set\_headers “Server: my\_server”;

If try to start nginx, will always get error :

nginx: [emerg] unknown directive “more\_set\_headers” in  
/usr/local/etc/nginx/nginx.conf

Not sure which forum should I report this bug to, nginx forum or  
FreeBSD  
forum?

Posted at Nginx Forum:

> **[Headers More module is not working in nginx-devel](https://forum.nginx.org/read.php?2,265939,265939#msg-265939)**
>
> Hi All, I'm using FreeBSD with nginx-devel. It seems that this problem is lasting for a long time (at least start from nginx 1.9.10 ). Even though I built the source with this module, this module is still not working. After add below configuration...

---

<div class="post-metadata">

**Author:** ![meteor8488](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@meteor8488](https://www.ruby-forum.com/u/meteor8488)\
**Post date:** [April 6, 2016, 2:53am UTC](https://www.ruby-forum.com/t/headers-more-module-is-not-working-in-nginx-devel/244410/2 "2016-04-06T02:53:38Z")

</div>

Hello,

Jim O.

> After add below configuration into http {},  
> more\_set\_headers “Server: my\_server”;
> 
> If try to start nginx, will always get error :
> 
> nginx: [emerg] unknown directive “more\_set\_headers” in  
> /usr/local/etc/nginx/nginx.conf

I’m guessing that you need to add:

load\_module modules/ngx\_http\_headers\_more\_filter\_module.so;

to the main section of nginx. conf.

---

<div class="post-metadata">

**Author:** ![meteor8488](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@meteor8488](https://www.ruby-forum.com/u/meteor8488)\
**Post date:** [April 6, 2016, 2:53am UTC](https://www.ruby-forum.com/t/headers-more-module-is-not-working-in-nginx-devel/244410/3 "2016-04-06T02:53:39Z")

</div>

On Tue, Apr 5, 2016, at 05:43 PM, meteor8488 wrote:

> If try to start nginx, will always get error :
> 
> nginx: [emerg] unknown directive “more\_set\_headers” in  
> /usr/local/etc/nginx/nginx.conf
> 
> Not sure which forum should I report this bug to, nginx forum or FreeBSD  
> forum?

It’s never not worked for me as long as I’ve been using it. Currently  
I’ve nginx v1.9.14, and it’s fine.

Post the output of your `nginx -V`.

Show how you configure & build the module, or where you’re getting it  
from.

Jim

---

<div class="post-metadata">

**Author:** ![meteor8488](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@meteor8488](https://www.ruby-forum.com/u/meteor8488)\
**Post date:** [April 6, 2016, 3:43pm UTC](https://www.ruby-forum.com/t/headers-more-module-is-not-working-in-nginx-devel/244410/4 "2016-04-06T15:43:34Z")

</div>

Hello,

On 4/6/16 8:53 AM, meteor8488 wrote:

> geoip and lua module, even though I didn’t load them, they are still  
> working.
> 
> So is there any differences between these modules? Why some of them need to  
> be loaded before use, some are not?

Most likely you are not using those modules in your configuration. You  
will only get a complaint from nginx if they are referenced in your  
configuration file(s) and not loaded.

Since you built nginx from FreeBSD ports, you can look at  
/usr/local/etc/nginx/nginx.conf-dist and it will show all the modules  
that have been built and need to be loaded dynamically if used.

–  
Jim O.

“Never argue with a fool, onlookers may not be able to tell the  
difference.” - Mark Twain

---

<div class="post-metadata">

**Author:** ![meteor8488](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@meteor8488](https://www.ruby-forum.com/u/meteor8488)\
**Post date:** [April 6, 2016, 2:53pm UTC](https://www.ruby-forum.com/t/headers-more-module-is-not-working-in-nginx-devel/244410/5 "2016-04-06T14:53:54Z")

</div>

Thanks. You’re right. After I load the module, it works.

Another question is for now I have 3 modules

-r-xr-xr-x 1 root wheel 17K 4 6 07:27 ngx\_http\_geoip\_module.so\*  
-r-xr-xr-x 1 root wheel 25K 4 6 07:27  
ngx\_http\_headers\_more\_filter\_module.so\*  
-r-xr-xr-x 1 root wheel 328K 4 6 07:27 ngx\_http\_lua\_module.so\*

But it seems I only need to load ngx\_http\_headers\_more\_filter\_module.so.  
For  
geoip and lua module, even though I didn’t load them, they are still  
working.

So is there any differences between these modules? Why some of them need  
to  
be loaded before use, some are not?

Posted at Nginx Forum:

> **[Re: Headers More module is not working in nginx-devel](https://forum.nginx.org/read.php?2,265939,265952#msg-265952)**
>
> Hi All, I'm using FreeBSD with nginx-devel. It seems that this problem is lasting for a long time (at least start from nginx 1.9.10 ). Even though I built the source with this module, this module is still not working. After add below configuration...
