Welcome! Log In Create A New Profile

Advanced

add_before_body

March 06, 2018 11:22PM
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;
}
--------------------------------------------

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

add_before_body

gariac March 06, 2018 11:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
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