Browse Source
This sorts out HTTP servers, hopefully. Adaptation for systemd and documentation are still requiredarch2
J. King
5 months ago
9 changed files with 71 additions and 20 deletions
@ -0,0 +1,5 @@ |
|||||
|
ProxyPreserveHost On |
||||
|
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/usr/share/arsse/arsse.php" |
||||
|
ProxyFCGISetEnvIf "-n req('Authorization')" HTTP_AUTHORIZATION "%{req:Authorization}" |
||||
|
|
||||
|
ProxyPass "unix:/var/run/php/arsse.sock|fcgi://localhost/usr/share/arsse/" |
@ -1,34 +1,34 @@ |
|||||
# Nextcloud News protocol |
# Nextcloud News protocol |
||||
<Location "/index.php/apps/news/api"> |
<Location "/index.php/apps/news/api"> |
||||
ProxyPass ${ARSSE_PROXY} |
Include "/etc/arsse/apache/arsse-fcgi.conf" |
||||
</Location> |
</Location> |
||||
|
|
||||
# Tiny Tiny RSS protocol |
# Tiny Tiny RSS protocol |
||||
<Location "/tt-rss/api"> |
<Location "/tt-rss/api"> |
||||
ProxyPass ${ARSSE_PROXY} |
Include "/etc/arsse/apache/arsse-fcgi.conf" |
||||
</Location> |
</Location> |
||||
|
|
||||
# Tiny Tiny RSS feed icons |
# Tiny Tiny RSS feed icons |
||||
<Location "/tt-rss/feed-icons"> |
<Location "/tt-rss/feed-icons"> |
||||
ProxyPass ${ARSSE_PROXY} |
Include "/etc/arsse/apache/arsse-fcgi.conf" |
||||
</Location> |
</Location> |
||||
|
|
||||
# Fever protocol |
# Fever protocol |
||||
<Location "/fever"> |
<Location "/fever"> |
||||
ProxyPass ${ARSSE_PROXY} |
Include "/etc/arsse/apache/arsse-fcgi.conf" |
||||
</Location> |
</Location> |
||||
|
|
||||
# Miniflux protocol |
# Miniflux protocol |
||||
<Location "/v1"> |
<Location "/v1"> |
||||
ProxyPass ${ARSSE_PROXY} |
Include "/etc/arsse/apache/arsse-fcgi.conf" |
||||
</Location> |
</Location> |
||||
|
|
||||
# Miniflux version number |
# Miniflux version number |
||||
<Location "/version"> |
<Location "/version"> |
||||
ProxyPass ${ARSSE_PROXY} |
Include "/etc/arsse/apache/arsse-fcgi.conf" |
||||
</Location> |
</Location> |
||||
|
|
||||
# Miniflux "health check" |
# Miniflux "health check" |
||||
<Location "/healthcheck"> |
<Location "/healthcheck"> |
||||
ProxyPass ${ARSSE_PROXY} |
Include "/etc/arsse/apache/arsse-fcgi.conf" |
||||
</Location> |
</Location> |
||||
|
@ -0,0 +1,6 @@ |
|||||
|
ProxyPreserveHost On |
||||
|
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/usr/share/webapps/arsse/arsse.php" |
||||
|
ProxyFCGISetEnvIf "-n req('Authorization')" HTTP_AUTHORIZATION "%{req:Authorization}" |
||||
|
|
||||
|
# Modify the below line to begin with "unix:/run/php-fpm-legacy/" if using the php-legacy package |
||||
|
ProxyPass "unix:/run/php/arsse.sock|fcgi://localhost/usr/share/webapps/arsse/" |
@ -0,0 +1,26 @@ |
|||||
|
#!/usr/bin/env bash |
||||
|
|
||||
|
readonly default_php="/usr/bin/php" |
||||
|
php="" |
||||
|
|
||||
|
check_sudo() { |
||||
|
if ! command -v sudo > /dev/null; then |
||||
|
printf "The sudo command is not available.\n" |
||||
|
exit 1 |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
# allow overriding the php executable |
||||
|
if [[ -n "${ARSSE_PHP}" ]] && command -v "${ARSSE_PHP}" > /dev/null; then |
||||
|
php="${ARSSE_PHP}" |
||||
|
else |
||||
|
php="${default_php}" |
||||
|
fi |
||||
|
|
||||
|
if [[ "${UID}" -eq 0 ]]; then |
||||
|
runuser -u "arsse" -- "$php" /usr/share/webapps/arsse/arsse.php "$@" |
||||
|
else |
||||
|
check_sudo |
||||
|
sudo -u "arsse" "$php" /usr/share/webapps/arsse/arsse.php "$@" |
||||
|
fi |
||||
|
|
@ -0,0 +1,16 @@ |
|||||
|
fastcgi_pass_header Authorization; # required if the Arsse is to perform its own HTTP authentication |
||||
|
fastcgi_pass_request_body on; |
||||
|
fastcgi_pass_request_headers on; |
||||
|
fastcgi_intercept_errors off; |
||||
|
fastcgi_buffering off; |
||||
|
fastcgi_param REQUEST_METHOD $request_method; |
||||
|
fastcgi_param CONTENT_TYPE $content_type; |
||||
|
fastcgi_param CONTENT_LENGTH $content_length; |
||||
|
fastcgi_param REQUEST_URI $uri; |
||||
|
fastcgi_param QUERY_STRING $query_string; |
||||
|
fastcgi_param HTTPS $https if_not_empty; |
||||
|
fastcgi_param REMOTE_USER $remote_user; |
||||
|
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/arsse/arsse.php; |
||||
|
|
||||
|
# Modify the below line to begin with "/run/php-fpm-legacy/" if using the php-legacy package |
||||
|
fastcgi_pass unix:/run/php/arsse.sock; |
Loading…
Reference in new issue