Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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).
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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