HttpAdditionModule not working for subdirectories

Smeagle nginx-forum at
Wed Mar 21 01:07:41 UTC 2012

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.

Given that variables are not supported in this module, how can I fix

Thank you so much!

Base system: Nginx 1.0.14 with PHP5-FPM

        location ~ \.php$ {
        root           /var/www;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME 
        include        fastcgi_params;
        add_before_body    /header/global.php;

Posted at Nginx Forum:,224124,224124#msg-224124

More information about the nginx mailing list