Created
April 16, 2020 07:52
-
-
Save antonlukin/dac9303f5180289f6ab98a5b0635770a to your computer and use it in GitHub Desktop.
Pass variable to SSI template with nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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