Run sabnzbd+ behind Apache on Synology

Update

Since DSM 5 the paths are changed:

DSM 4:

  •  /usr/syno/etc/httpd-ssl-vhost.conf-user
  • /usr/syno/apache/conf/httpd.conf-user

DSM 5:

  • /etc/httpd/sites-enabled-user/httpd-ssl-vhost.conf-user
  • /etc/httpd/conf/httpd.conf-user

I’m an owner of a Synology DS211 and i have installed Sabnzbd+ on it, using this helpful package http://synoblog.superzebulon.org/2011/09/sabnzbd-0-6-9-1-spk/ (add it to your favorites, it’s a really nice site with more packages to download).

My  Synology is running on the latest 3.2 firmware.

After installation Sabnzbd+ is running on the following address http://private-diskstation-ip:8080, and i wanted to make it accessible in a secure way from the internet.
I want to be able to access the sabnzbd+ instance only from https and with a user/password prompt.

This could be done by configuring Apache. In fact i want to run sabnzbd+ behind Apache on Synology.

After a evening of searching and probing i finally got it working as I wanted:

The first thing to do if you haven’t already did it is to enable access to the Synology from the Command Line (http://forum.synology.com/wiki/index.php/Enabling_the_Command_Line_Interface)

Then from the prompt we edit the Apache configuration file with vi
(here are the basic commands: http://forum.synology.com/wiki/index.php/Basic_commands_for_the_Linux_vi_Editor):

For DSM 4:

For DSM 5:

We have to add the following directives at the end of the file:

Then we modify the virtual host file (i want to access Sabnzbd+ from a sub domain url, like subdomain.domain.com)

For DSM 4:

For DSM 5:

And I added the following text:

Note that i already have created an authentication file (users.pw) which i’m using also for other protected host, if you don’t know how to create it follow this http://www.synology.com/support/faq_show.php?q_id=347&lang=enu

Then restart apache:

For DSM 4:

For DSM 5:

Ready! Now i’m able to reach Sabnzbd+ running on my Synology from subdomain.domain.com in https and with user/pass prompt.

After doing that, be careful about editing vhosts with the Synology Gui, because modifying them from there will overwrite our custom modifications we have done in the /usr/syno/etc/httpd-ssl-vhost.conf-user file.

Don’t forget to open port TCP 443 on your router/modem and forward it to the internal ip of your Synology, and to create the subdomain in your DNS server/hosting provider.

Author: Marco Mansi

Focus and dedication to everything that has to do with technology and, most of all, software development and architecture is what describes Marco. Marco is curious and interested in everything that is new and seeks to understand the more quickly the potential and the ability to implement these technologies in the real world. Marco loves open source and thinks that sharing knowledge is the key to make better things.

3 thoughts on “Run sabnzbd+ behind Apache on Synology”

  1. Thanks for this really useful post.

    Sorry to bring you back to it after so long but..

    Could this be used to access multiple services on a syno?

    I use dyndns so i can access my ip address at username.dyndns.org.

    I then use the virtual server settings on my adsl router to forward various ports to the ports on my syno (username.dyndns.org:9200 for sab, username.dyndns.org:9300 for couchpotato etc)

    would it be possible to use the reverse proxy so that i connect to username.dyndns.org/sab
    username.dyndns.org/couch
    etc

    and the requests are forwarded to the internal port.

    This would make it easier to access (names instead of port numbers) and i could also close off the multiple ports and just connect through a single port.

    1. yes, this can be done.
      You can use a subdomain like yourservice.dyndns.org, or with a subdir like username.dyndns.org/yourservice.

      If you choose for a subdir then you have to change the vhost config like (you have to modify the location and remove the / at the end of the proxypass lines)

      For service like couchpotato you have also to modify some settings for the program, take a look at:

      http://lime-technology.com/forum/index.php?topic=15913.0

Leave a Reply