diff options
author | Florian Dold <florian@dold.me> | 2021-07-30 13:25:12 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-07-30 13:25:15 +0200 |
commit | 08fe9ada3316343df083dc78ec5b294a8d2c17ff (patch) | |
tree | d3c3117dae6cd4a820ced53729ef68b1d2a12552 /debian/etc | |
parent | c94541d3ed3bddc22cdee22c1dd56056b83d0fdb (diff) | |
download | merchant-08fe9ada3316343df083dc78ec5b294a8d2c17ff.tar.gz merchant-08fe9ada3316343df083dc78ec5b294a8d2c17ff.tar.bz2 merchant-08fe9ada3316343df083dc78ec5b294a8d2c17ff.zip |
debian: just install sample websites
Diffstat (limited to 'debian/etc')
-rw-r--r-- | debian/etc/apache2/sites-available/taler-merchant.conf | 18 | ||||
-rw-r--r-- | debian/etc/nginx/sites-available/taler-merchant | 19 |
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/etc/apache2/sites-available/taler-merchant.conf b/debian/etc/apache2/sites-available/taler-merchant.conf new file mode 100644 index 00000000..eebc6826 --- /dev/null +++ b/debian/etc/apache2/sites-available/taler-merchant.conf @@ -0,0 +1,18 @@ +<!-- + Make sure to enable the following Apache modules before + integrating this into your configuration: + + # a2enmod proxy + # a2enmod proxy_http + # a2enmod headers + # a2enmod rewrite +--> + +<Location "/taler-merchant/"> +RewriteEngine On +RewriteCond "%{HTTP:AUTHORIZATION}" "!= %SECURITYTOKEN%" +RewriteRule "(.+)/private/" "-" [F] + +ProxyPass "unix:/var/lib/taler-merchant/httpd/merchant.sock|http://example.com/" +RequestHeader add "X-Forwarded-Proto" "https" +</Location> diff --git a/debian/etc/nginx/sites-available/taler-merchant b/debian/etc/nginx/sites-available/taler-merchant new file mode 100644 index 00000000..82aaa306 --- /dev/null +++ b/debian/etc/nginx/sites-available/taler-merchant @@ -0,0 +1,19 @@ +location ~ /taler-merchant/private/ { + if ($http_authorization !~ "(?i)ApiKey %SECURITYTOKEN%") { + return 401; + } + proxy_pass http://unix:/var/lib/taler-merchant/httpd/merchant.sock; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host "example.com"; + proxy_set_header X-Forwarded-Proto "https"; +} + +location /taler-merchant/ { + proxy_pass http://unix:/var/lib/taler-merchant/httpd/merchant.sock; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host "example.com"; + proxy_set_header X-Forwarded-Proto "https"; + +}
\ No newline at end of file |