0

Is there any way to do templating in nginx? For example, if I have a file like this:

{header}
<h1>This is a header</h1>
This is not a header
{footer}

and then use NGINX to replace {header} with, say, this:

<!DOCTYPE html>
<html>
<head><title>This is a title</title></head>
<body>

and {footer} with a similar thing. The purpose of this would be to be able to have shared code between html files. Is this possible in nginx, or will I have to use a reverse proxy to a different server program that can do templating?

markasoftware
  • 489
  • 1
  • 5
  • 7

1 Answers1

2

No, you can't do that with nginx you will have to find a different way to do it.

user9517
  • 115,471
  • 20
  • 215
  • 297