From 6d790c5efd15525c7f0b20f32f8d42c5c7808ec5 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 19 May 2021 18:59:20 -0400 Subject: [PATCH] Add prototype for new Apache configuration Needs testing --- dist/apache.conf | 23 --------------------- dist/apache/arsse-loc.conf | 41 ++++++++++++++++++++++++++++++++++++++ dist/apache/arsse.conf | 10 ++++++++++ dist/apache/example.conf | 9 +++++++++ dist/arch/PKGBUILD | 6 +++--- 5 files changed, 63 insertions(+), 26 deletions(-) delete mode 100644 dist/apache.conf create mode 100644 dist/apache/arsse-loc.conf create mode 100644 dist/apache/arsse.conf create mode 100644 dist/apache/example.conf diff --git a/dist/apache.conf b/dist/apache.conf deleted file mode 100644 index c0122967..00000000 --- a/dist/apache.conf +++ /dev/null @@ -1,23 +0,0 @@ -# N.B. the unix:/var/run/php/php7.2-fpm.sock path used repeatedly below will -# vary from system to system and will be probably need to be changed - - - ServerName localhost - # adjust according to your installation path - DocumentRoot /usr/share/arsse/www - - # adjust according to your installation path - ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/usr/share/arsse/arsse.php" - ProxyPreserveHost On - - # Nextcloud News v1.2, Tiny Tiny RSS API, TT-RSS newsfeed icons, Miniflux API - - ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse" - - - # Nextcloud News API detection, Fever API, Miniflux miscellanies - - # these locations should not be behind HTTP authentication - ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse" - - diff --git a/dist/apache/arsse-loc.conf b/dist/apache/arsse-loc.conf new file mode 100644 index 00000000..5b7a92ec --- /dev/null +++ b/dist/apache/arsse-loc.conf @@ -0,0 +1,41 @@ +# Nextcloud News version list + + ProxyPass ${ARSSE_PROXY} + + +# Nextcloud News protocol + + ProxyPass ${ARSSE_PROXY} + + +# Tiny Tiny RSS protocol + + ProxyPass ${ARSSE_PROXY} + + +# Tiny Tiny RSS feed icons + + ProxyPass ${ARSSE_PROXY} + + +# NOTE: The DocumentRoot directive will dictate whether TT-RSS static images are served correctly + +# Fever protocol + + ProxyPass ${ARSSE_PROXY} + + +# Miniflux protocol + + ProxyPass ${ARSSE_PROXY} + + +# Miniflux version number + + ProxyPass ${ARSSE_PROXY} + + +# Miniflux "health check" + + ProxyPass ${ARSSE_PROXY} + diff --git a/dist/apache/arsse.conf b/dist/apache/arsse.conf new file mode 100644 index 00000000..469dc8ec --- /dev/null +++ b/dist/apache/arsse.conf @@ -0,0 +1,10 @@ +Define ARSSE_CONF "/etc/arsse/apache/" +Define ARSSE_DATA "/usr/share/arsse/" +Define ARSSE_PROXY "unix:/var/run/php/arsse.sock|fcgi://localhost${ARSSE_DATA}" + +DocumentRoot "${ARSSE_DATA}www" + +ProxyPreserveHost On +ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "${ARSSE_DATA}arsse.php" + +Include "${ARSSE_CONF}arsse-loc.conf" diff --git a/dist/apache/example.conf b/dist/apache/example.conf new file mode 100644 index 00000000..0e1f356f --- /dev/null +++ b/dist/apache/example.conf @@ -0,0 +1,9 @@ + + ServerName "news.example.com" + SSLEngine On + + SSLCertificateFile "/etc/letsencrypt/live/news.example.com/fullchain.pem" + SSLCertificateKeyFile "/etc/letsencrypt/live/news.example.com/privkey.pem" + + Include "/etc/arsse/apache/arsse.conf" + diff --git a/dist/arch/PKGBUILD b/dist/arch/PKGBUILD index 8d1f2fb5..c9c07c14 100644 --- a/dist/arch/PKGBUILD +++ b/dist/arch/PKGBUILD @@ -35,7 +35,7 @@ package() { cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf" cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf" - cp -r dist/nginx config.defaults.php "$pkgdir/etc/webapps/arsse" + cp -r dist/nginx dist/apache config.defaults.php "$pkgdir/etc/webapps/arsse" cd "$pkgdir" # adjust permissions, just in case chmod -R u=rwX,g=rX,o=rX * @@ -46,7 +46,7 @@ package() { install -Dm755 dist/arsse "$pkgdir/usr/bin" install -Dm640 dist/arch/config.php "$pkgdir/etc/webapps/arsse" # patch generic configuration files to use Arch-specific paths and identifiers - sed -ise 's/\/\(etc\|usr\/share\)\/arsse\//\/\1\/webapps\/arsse\//' "$pkgdir/etc/webapps/arsse/nginx/"* "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" "$pkgdir/usr/lib/systemd/system/"* "$pkgdir/usr/bin/"* - sed -ise 's/\/var\/run\/php\//\/run\/php-fpm\//' "$pkgdir/etc/webapps/arsse/nginx/"* "$pkgdir/etc/php/php-fpm.d/arsse.conf" + sed -ise 's/\/\(etc\|usr\/share\)\/arsse\//\/\1\/webapps\/arsse\//' "$pkgdir/etc/webapps/arsse/nginx/"* "$pkgdir/etc/webapps/arsse/apache/"* "$pkgdir/usr/lib/tmpfiles.d/arsse.conf" "$pkgdir/usr/lib/systemd/system/"* "$pkgdir/usr/bin/"* + sed -ise 's/\/var\/run\/php\//\/run\/php-fpm\//' "$pkgdir/etc/webapps/arsse/nginx/"* "$pkgdir/etc/webapps/arsse/apache/"* "$pkgdir/etc/php/php-fpm.d/arsse.conf" sed -ise 's/www-data/http/' "$pkgdir/etc/php/php-fpm.d/arsse.conf" }