Welcome! Log In Create A New Profile

Advanced

Re: HttpAdditionModule not working for subdirectories

Maxim Dounin
March 21, 2012 07:22AM
Hello!

On Tue, Mar 20, 2012 at 09:07:41PM -0400, Smeagle wrote:

> Hy everyone!
>
> It turns out that HttpAdditionModule is only working for the PHP files
> stored into the web root dir. All content from, let's say, "/forum"
> won't display the embedded content.
>
> Error log pointed out that Nginx is including the subdirectory into the
> HttpAdditionModule URI, so "/header/global.php" mistakenly becomes
> "/forum/header/global.php". Needless to say, that file doesn't exist.

No it doesn't.

Note though, that uri specified in add_before_body is subject
normal processing, and if there are rewrites or something like in
your config - you may end up with completely different uri.

> Given that variables are not supported in this module, how can I fix
> that?
>
> Thank you so much!
>
>
> Base system: Nginx 1.0.14 with PHP5-FPM
> Settings:
>
> location ~ \.php$ {
> root /var/www;
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> include fastcgi_params;
> add_before_body /header/global.php;

Please show full config which triggers the problem for you. I
suppose there are rewrites which change /header/global.php to
/forum/header/global.php.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

HttpAdditionModule not working for subdirectories

Smeagle March 20, 2012 09:07PM

Re: HttpAdditionModule not working for subdirectories

Maxim Dounin March 21, 2012 07:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 272
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready