All my pages have similar static header and footer parts inside the body tag. head tags are similar too, but feature title, keywords and description which differ between pages.

Can I use nginx to compose the output file taking parts of it from static files and other parts from the application server?


There's a module for Nginx to enable SSI functionality. It's quite well documented here. There are a few issues to be aware of:

  • Relative parent paths are unavailable (e.g., ../.. will not work).
  • Some variables (such as LAST_MODIFIED) are not available.
  • The syntax for directives must include a space (e.g., <--#include must be <--# include).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.