From 6dc199554f0bb1692a86240ec8ae032d97ccf325 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 30 Jul 2021 15:50:45 +0200 Subject: debian: socket location --- debian/anastasis-httpd.postrm | 47 ++---------------------------- debian/etc/nginx/sites-available/anastasis | 20 ++++++++----- src/backend/anastasis.conf | 2 +- 3 files changed, 16 insertions(+), 53 deletions(-) diff --git a/debian/anastasis-httpd.postrm b/debian/anastasis-httpd.postrm index fc96f0e..3b707d2 100644 --- a/debian/anastasis-httpd.postrm +++ b/debian/anastasis-httpd.postrm @@ -2,31 +2,6 @@ set -e -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 -} - -apache_remove() { - if [ diff /etc/anastasis/apache.conf /etc/apache2/conf-available/anastasis.conf ] >/dev/null 2>&1; then - rm -f /etc/apache2/conf-available/anastasis.conf - fi -} - -nginx_remove() { - if [ diff /etc/taler-exchange/nginx.conf /etc/apache2/conf-available/taler-exchange.conf ] >/dev/null 2>&1; then - rm -f /etc/nginx/conf-available/anastasis.conf - fi -} - if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi @@ -36,31 +11,13 @@ if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then dbc_go anastasis "$@" fi -if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then - if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_version 2.0 - db_get anastasis/reconfigure-webserver - webservers="$RET" - for webserver in $webservers; do - webserver=${webserver%,} - if [ "$webserver" = "nginx" ]; then - nginx_remove - else - apache_remove - fi - done - fi -fi - case "${1}" in purge) - rm -f /var/lib/anastasis/master-api-key.txt rm -rf /var/lib/anastasis/httpd/ ;; -remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) ;; +remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) + ;; -\ *) echo "postrm called with unknown argument \`${1}'" >&2 exit 1 diff --git a/debian/etc/nginx/sites-available/anastasis b/debian/etc/nginx/sites-available/anastasis index 6828f0b..4b39229 100644 --- a/debian/etc/nginx/sites-available/anastasis +++ b/debian/etc/nginx/sites-available/anastasis @@ -1,8 +1,14 @@ -location /anastasis/ { - proxy_pass http://unix:/var/lib/anastasis/httpd/anastasis.sock; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host "example.com"; - proxy_set_header X-Forwarded-Proto "https"; +server { + listen 80; + listen [::]:80; -} \ No newline at end of file + # server_name example.com + + location /anastasis/ { + proxy_pass http://unix:/run/anastasis/httpd/anastasis-http.sock; + proxy_redirect off; + proxy_set_header Host $host; + #proxy_set_header X-Forwarded-Host "example.com"; + #proxy_set_header X-Forwarded-Proto "https"; + } +} diff --git a/src/backend/anastasis.conf b/src/backend/anastasis.conf index ddc1a65..23015ae 100644 --- a/src/backend/anastasis.conf +++ b/src/backend/anastasis.conf @@ -19,7 +19,7 @@ PORT = 9977 # Which unix domain path should we bind to? Only used if "SERVE" is 'unix'. -UNIXPATH = ${ANASTASIS_RUNTIME_DIR}/backend.http +UNIXPATH = ${ANASTASIS_RUNTIME_DIR}/httpd/anastasis-http.sock # What should be the file access permissions (see chmod) for "UNIXPATH"? UNIXPATH_MODE = 660 -- cgit v1.2.3