diff --git a/dist/apache.conf b/dist/apache.conf new file mode 100644 index 00000000..575d3aed --- /dev/null +++ b/dist/apache.conf @@ -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 + + + 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 + + ProxyPass "unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/usr/share/arsse" + + + # NextCloud News API detection, Fever API + + # 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/nginx-fcgi.conf b/dist/nginx-fcgi.conf deleted file mode 100644 index 2890fc9a..00000000 --- a/dist/nginx-fcgi.conf +++ /dev/null @@ -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; diff --git a/dist/nginx.conf b/dist/nginx.conf index 98e130c8..ecc32c25 100644 --- a/dist/nginx.conf +++ b/dist/nginx.conf @@ -1,56 +1,57 @@ server { - server_name news.example.com; + server_name example.com; listen 80; # adding HTTPS configuration is highly recommended - # redirect to HTTPS, if desired - #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; + root /usr/share/arsse/www; # adjust according to your installation path location / { try_files $uri $uri/ =404; } - location @arsse_auth { - # the userPreAuth setting should be enabled if the Web server is handling authentication - #auth_basic "Advanced RSS Environment"; - include /usr/share/arsse/dist/nginx-fcgi.conf; - } - - location @arsse_no_auth { - auth_basic off; - include /usr/share/arsse/dist/nginx-fcgi.conf; + location @arsse { + fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; # adjust according to your system configuration + 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; # adjust according to your installation path + 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 location /index.php/apps/news/api { - try_files $uri @arsse_auth; + try_files $uri @arsse; 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 location /tt-rss/api { - try_files $uri @arsse_no_auth; + try_files $uri @arsse; } # Tiny Tiny 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/ { - auth_basic off; - root /usr/share/arsse/www; + # this path should not be behind HTTP authentication try_files $uri =404; } # Fever protocol location /fever/ { + # this path should not be behind HTTP authentication try_files $uri @arsse_no_auth; } } diff --git a/docs/en/020_Getting_Started/020_Download_and_Installation.md b/docs/en/020_Getting_Started/020_Download_and_Installation.md index 38381d0f..9d83e1c4 100644 --- a/docs/en/020_Getting_Started/020_Download_and_Installation.md +++ b/docs/en/020_Getting_Started/020_Download_and_Installation.md @@ -21,7 +21,7 @@ sudo apt install php-intl php-json php-xml php-curl 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 # 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 -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. diff --git a/docs/en/020_Getting_Started/030_Web_Server_Configuration.md b/docs/en/020_Getting_Started/030_Web_Server_Configuration.md index 578fdad6..0f8bc644 100644 --- a/docs/en/020_Getting_Started/030_Web_Server_Configuration.md +++ b/docs/en/020_Getting_Started/030_Web_Server_Configuration.md @@ -80,10 +80,15 @@ sudo systemctl restart apache2 Afterward the follow virtual host configuration should work, after modifying path as appropriate: ```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 + 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