how to install nginx_substitutions_filter in existing Nginx

David Woodstuck leeon2013 at gmail.com
Mon Jun 19 01:59:43 UTC 2017


Thank Francis for your help.

I just install nginx_substitutions_filter from source. It works well as
expected.  I have a special requirement I will describe below.

I have a host Nginx server running in port: 9000, This Nginx will proxy
http://www.myserver.com:10085/. Some pages from
http://www.myserver.com:10085/ have a lot of iframes whose srcs are
http://www.myserver.com:10088/ and http://www.myserver.com:10089/. I cannot
get access to http://www.myserver.com:10085/, http://www.myserver.com:10088/
and http://www.myserver.com:10089/. I want the pages from
http://www.myserver.com:10085/ to have CORS( add_header
'Access-Control-Allow-Origin' '*').  How do I achieve this?


Thanks,

David


On Tue, Jun 6, 2017 at 1:21 PM, Francis Daly <francis at daoine.org> wrote:

> On Tue, Jun 06, 2017 at 12:27:04AM -0400, David Woodstuck wrote:
>
> Hi there,
>
> > I am a new Nginx user. I just install Nginx 1.12. I like to
> > use nginx_substitutions_filter. I cannot figure out how to install
> > nginx_substitutions_filter in previously existing Nginx.
>
> You (probably) don't.
>
> https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/
>
> describes how to build from source in general;
>
> https://www.nginx.com/resources/wiki/modules/substitutions/
>
> describes how to include the modules you mention, in specific.
>
> > Should I unstall Nginx first?
>
> You can run "nginx -V" to see the "configure" arguments that were used
> to create your current version. Then add the extra bits that you want.
>
> Depending on precisely how you installed your current nginx, you probably
> *do* want to uninstall it before installing the new one.
>
>
> If your current nginx supports dynamic modules (1.12 does), and if
> this extra module you want supports being built as a dynamic module,
> then you may be able to build-and-add the module.
>
> I suspect that in your case, you will probably find more clear
> documentation on how to build-and-maintain a new nginx than how to
> build-and-maintain the extra module.
>
> I also suspect that, based on parallel mail threads, you probably do
> not need the extra module.
>
> It is still useful to know how to add a module that you want, so it is
> certainly worth trying it on a test system, at least.
>
> Good luck with it,
>
>         f
> --
> Francis Daly        francis at daoine.org
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170618/026e2ccb/attachment.html>


More information about the nginx mailing list