add_before_body

lists at lazygranch.com lists at lazygranch.com
Wed Mar 7 04:20:13 UTC 2018


I can't get the add_before_body feature to work. I have verified the
module is installed.

Here is what I am trying to accomplish. I want to add the following
lines to the header of every html file:
------------------------
<link rel="apple-touch-icon" sizes="180x180"
href="/apple-touch-icon.png"> <link rel="icon" type="image/png"
sizes="32x32" href="/favicon-32x32.png"> <link rel="icon"
type="image/png" sizes="16x16" href="/favicon-16x16.png"> <link
rel="manifest" href="/site.webmanifest"> <link rel="mask-icon"
href="/safari-pinned-tab.svg" color="#5bbad5"> <meta
name="msapplication-TileColor" content="#da532c"> <meta
name="theme-color" content="#ffffff">
--------------------------------------------------
This is supposed to satisfy all browser requests for favicon, tablet
icons, etc. 

I have these lines in a file named "before" and that file is located in
the web root.

This is how I implemented the feature:
---------
        location / {
            root   /usr/share/nginx/html/example.com/public_html;
            add_before_body /before;
            index  index.html index.htm;
        }
--------------------------------------------



More information about the nginx mailing list