mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Consolidate configuration samples
This commit is contained in:
parent
d9d9394c97
commit
7f9f11bbf4
5 changed files with 54 additions and 38 deletions
23
dist/apache.conf
vendored
Normal file
23
dist/apache.conf
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# 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
|
||||||
|
|
||||||
|
<VirtualHost *:80>
|
||||||
|
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
|
||||||
|
<LocationMatch "(/index\.php/apps/news/api/?.+|/tt-rss/(api|feed-icons))">
|
||||||
|
ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse"
|
||||||
|
</LocationMatch>
|
||||||
|
|
||||||
|
# NextCloud News API detection, Fever API
|
||||||
|
<LocationMatch "(/index\.php/apps/news/api/?$|/fever)">
|
||||||
|
# these locations should not be behind HTTP authentication
|
||||||
|
ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse"
|
||||||
|
</LocationMatch>
|
||||||
|
</VirtualHost>
|
13
dist/nginx-fcgi.conf
vendored
13
dist/nginx-fcgi.conf
vendored
|
@ -1,13 +0,0 @@
|
||||||
fastcgi_pass php; # PHP is assumed to already be configured for FastCGI operation
|
|
||||||
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 SCRIPT_FILENAME /usr/share/arsse/arsse.php;
|
|
||||||
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 HTTPS $https if_not_empty;
|
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
|
47
dist/nginx.conf
vendored
47
dist/nginx.conf
vendored
|
@ -1,56 +1,57 @@
|
||||||
server {
|
server {
|
||||||
server_name news.example.com;
|
server_name example.com;
|
||||||
listen 80; # adding HTTPS configuration is highly recommended
|
listen 80; # adding HTTPS configuration is highly recommended
|
||||||
# redirect to HTTPS, if desired
|
root /usr/share/arsse/www; # adjust according to your installation path
|
||||||
#if ($https != "on") {rewrite ^ https://$host$request_uri;}
|
|
||||||
# the userPreAuth setting should be enabled if the Web server is handling authentication
|
|
||||||
#auth_basic "Advanced RSS Environment";
|
|
||||||
root /usr/share/arsse/www;
|
|
||||||
index index.html;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @arsse_auth {
|
location @arsse {
|
||||||
# the userPreAuth setting should be enabled if the Web server is handling authentication
|
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; # adjust according to your system configuration
|
||||||
#auth_basic "Advanced RSS Environment";
|
fastcgi_pass_header Authorization; # required if the Arsse is to perform its own HTTP authentication
|
||||||
include /usr/share/arsse/dist/nginx-fcgi.conf;
|
fastcgi_pass_request_body on;
|
||||||
}
|
fastcgi_pass_request_headers on;
|
||||||
|
fastcgi_intercept_errors off;
|
||||||
location @arsse_no_auth {
|
fastcgi_buffering off;
|
||||||
auth_basic off;
|
fastcgi_param SCRIPT_FILENAME /usr/share/arsse/arsse.php; # adjust according to your installation path
|
||||||
include /usr/share/arsse/dist/nginx-fcgi.conf;
|
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 HTTPS $https if_not_empty;
|
||||||
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
}
|
}
|
||||||
|
|
||||||
# NextCloud News protocol
|
# NextCloud News protocol
|
||||||
location /index.php/apps/news/api {
|
location /index.php/apps/news/api {
|
||||||
try_files $uri @arsse_auth;
|
try_files $uri @arsse;
|
||||||
|
|
||||||
location ~ ^/index\.php/apps/news/api/?$ {
|
location ~ ^/index\.php/apps/news/api/?$ {
|
||||||
try_files $uri @arsse_no_auth;
|
# this path should not be behind HTTP authentication
|
||||||
|
try_files $uri @arsse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Tiny Tiny RSS protocol
|
# Tiny Tiny RSS protocol
|
||||||
location /tt-rss/api {
|
location /tt-rss/api {
|
||||||
try_files $uri @arsse_no_auth;
|
try_files $uri @arsse;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Tiny Tiny RSS feed icons
|
# Tiny Tiny RSS feed icons
|
||||||
location /tt-rss/feed-icons/ {
|
location /tt-rss/feed-icons/ {
|
||||||
try_files $uri @arsse_no_auth;
|
try_files $uri @arsse;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Tiny Tiny RSS special-feed icons
|
# Tiny Tiny RSS special-feed icons; these are static files
|
||||||
location /tt-rss/images/ {
|
location /tt-rss/images/ {
|
||||||
auth_basic off;
|
# this path should not be behind HTTP authentication
|
||||||
root /usr/share/arsse/www;
|
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Fever protocol
|
# Fever protocol
|
||||||
location /fever/ {
|
location /fever/ {
|
||||||
|
# this path should not be behind HTTP authentication
|
||||||
try_files $uri @arsse_no_auth;
|
try_files $uri @arsse_no_auth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ sudo apt install php-intl php-json php-xml php-curl
|
||||||
sudo apt install php-sqlite3 php-pgsql php-mysql
|
sudo apt install php-sqlite3 php-pgsql php-mysql
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, it's a simple matter of unpacking the archive someplace (`/usr/share/arsse` is the recommended location on Linux systems, but it can be anywhere) and setting permissions:
|
Then, it's a simple matter of unpacking the archive someplace (`/usr/share/arsse` is the recommended location on Debian systems, but it can be anywhere) and setting permissions:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Unpack the archive
|
# Unpack the archive
|
||||||
|
@ -49,6 +49,6 @@ It's also possible to instead use a cron job to schedule newsfeed checks, but us
|
||||||
|
|
||||||
# Next Steps
|
# Next Steps
|
||||||
|
|
||||||
In order for the various synchronization protocols to work, a Web server [must be configured](Web_Server_Configuration), and in order for The Arsse to serve users, those users [must be created](Managing_Users). The following manual pages provide details on how to get this set up.
|
In order for the various synchronization protocols to work, a Web server [must be configured](Web_Server_Configuration), and in order for The Arsse to serve users, those users [must be created](/en/Using_The_Arsse/Managing_Users). The following manual pages provide details on how to get this set up.
|
||||||
|
|
||||||
You may also want to review the `config.defaults.php` file included in the download package and create [a configuration file](Configuration), though The Arsse can function even without using a configuration file.
|
You may also want to review the `config.defaults.php` file included in the download package and create [a configuration file](Configuration), though The Arsse can function even without using a configuration file.
|
||||||
|
|
|
@ -80,10 +80,15 @@ sudo systemctl restart apache2
|
||||||
Afterward the follow virtual host configuration should work, after modifying path as appropriate:
|
Afterward the follow virtual host configuration should work, after modifying path as appropriate:
|
||||||
|
|
||||||
```apache
|
```apache
|
||||||
|
# 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
|
||||||
|
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName localhost
|
ServerName localhost
|
||||||
|
# adjust according to your installation path
|
||||||
DocumentRoot /usr/share/arsse/www
|
DocumentRoot /usr/share/arsse/www
|
||||||
|
|
||||||
|
# adjust according to your installation path
|
||||||
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/usr/share/arsse/arsse.php"
|
ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/usr/share/arsse/arsse.php"
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue