Skip to content

Instantly share code, notes, and snippets.

@inancsevinc
Created June 18, 2012 21:07
Show Gist options
  • Save inancsevinc/2950723 to your computer and use it in GitHub Desktop.
Save inancsevinc/2950723 to your computer and use it in GitHub Desktop.
configuration example of HttpSubModule, replaces "__name__" in the response
server {
listen 80;
server_name localhost;
root D:/Development/public;
sub_filter_once off;
location / {
if ($uri ~* /(\w+)\.html$) {
set $filename "$1";
}
sub_filter "__name__" $filename;
try_files $uri $uri/ ;
}
}
<html>
<head>
<title>__name__</title>
</head>
<body>
<h1>Contents of __name__:</h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment