Welcome! Log In Create A New Profile

Advanced

PHP Script Injection with NGINX

Posted by austevo 
PHP Script Injection with NGINX
July 29, 2015 07:51PM
Hi All,

I need to inject some PHP code into our NGINX reverse proxy server here. I've done my research, but as I'm a bit new to NGINX I want to be extra cautious to not mess anything up.

From what I've gathered, to do the above I'll need to use the ngx_http_sub_module. And to do so, I need to ensure it's enabled.

So, I ran: nginx -V and the below is present:

--add-module=/build/nginx-gKBGMk/nginx-1.6.2/debian/modules/ngx_http_substitutions_FILTER_module

Is that the same as ngx_http_sub_module? The one that's enabled on our system has 'filter' in it, where as in this article http://nginx.org/en/docs/http/ngx_http_sub_module.html the module is named "ngx_http_sub_module". Judging by their descriptions, they don't seem the same.

Assuming it's the correct module, how would I go about setting the parameters for the PHP injection, which file do I modify and will I need to re-compile the setup?

Assuming it's not the correct module, do I need to re-compile the entire setup, if so how would I ensure all of the current settings remain the same, and where would I specify the injection parameters?

Thank you
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready