Skip to content

Instantly share code, notes, and snippets.

@antonlukin
Created April 16, 2020 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonlukin/dac9303f5180289f6ab98a5b0635770a to your computer and use it in GitHub Desktop.
Save antonlukin/dac9303f5180289f6ab98a5b0635770a to your computer and use it in GitHub Desktop.
Pass variable to SSI template with nginx
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test your knowlege!</title>
</head>
<body>
<h1>I answered <!--# echo var="count" --> questions correctly!</h1>
</body>
</html>
server {
location ~ ^/result/(?<count>[0-9]|10)/$ {
ssi on;
alias /var/www/share;
try_files /index.html =404;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment