Switching Apache to Nginx and Selfoss
After updating the Synology and switch webserver from Apache to Nginx, the web-based RSS reader selfoss stopped working. This application uses a .htaccess file to rewrite all requests in Apache. Unfortunately, Nginx doesn’t support .htaccess files.
Make these adjustments in: /etc/nginx/app.d/server.webstation-vhost.conf (last line before the final closing bracket ‘}’. Keep in mind, the space after $1 belongs in the configuration file. If you forget about this nginx won’t restart (with the command: nginx -s reload).
# Custom configuration by Randy - Fix SelfOss RSS reader location /selfoss { root /volume1/web; } location ~ ^/selfoss/$ { index index.php; } location ~ ^/selfoss/favicons/(.+)$ { try_files /selfoss/data/favicons/$1 =404; } location ~ ^/selfoss/(.+)$ { try_files /selfoss/public/$1 /selfoss/index.php$is_args$args; }
If you also want to switch other applications from Apache reverse proxy to Nginx, the configuration would be:
# Custom configuration by Randy - Add reverse proxies location /sabnzbd { proxy_pass http://127.0.0.1:8080; } location /sb { proxy_pass http://127.0.0.1:8083/sb; } location /transmission { proxy_pass http://127.0.0.1:9091/transmission; } location /couchpotato { proxy_pass http://127.0.0.1:5053/couchpotato; } # Spotweb fix for API via NGingx location /spotweb { if ($uri !~ "api/"){ rewrite api/?$ /spotweb/index.php?page=newznabapi last; } }
Leave a Reply