J. King
5 years ago
5 changed files with 54 additions and 38 deletions
@ -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> |
@ -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; |
|
@ -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; |
||||
} |
} |
||||
} |
} |
||||
|
Loading…
Reference in new issue