Addition Module

Tony Holmes atholmes at gmail.com
Tue Apr 1 17:15:44 MSD 2008


>
>         location / {
>                 add_before_body         /.internal/banner.html;
>                 root                    /www/users/$vdir;
>                 index                   index.html index.htm;
>         }
>
>         location /.internal/ {
>                 internal;
>                 root    /www/html;
>         }
>     }
>
>
Forgive the reply to myself but I found the source of the problem. I
wondered if the .internal was being prepended and accidentally put a symlink
to itself (infinite loop) in the /www/html and it threw an error. Sure
enough, it was looking in /www/html/.internal/ - I could not get any logging
to show this before.

So now I see my code being included but it is not what I want. I am getting:

<!-- included code here -->
<html>
<body>
Body of page
</body>
</html>

I want the included code to appear immediately after the opening body tag
(in-line html insertion). I've googled around a fair bit but have not found
anything in the results pointing to such an ability. I cannot depend on a
consistent set of options in the body tag since the html pages are user
created (not by us). I was hoping that the Addition Module truly was like
mod_layout in the comparison matrix, but it is not.

Does anyone have any pointers/suggestions?

TIA!

Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080401/d6d22e90/attachment.html>


More information about the nginx mailing list