[Synology] VirtualHost / ProxyPass - SOLVED

Need help? Post your questions here.

[Synology] VirtualHost / ProxyPass - SOLVED

Unread postby z-vap » 20 Feb 2015, 13:21

so hey all.

I was wondering if any of the other Synology users have been able to get any apache proxypass configurations to work?

Ultimately I'd like to get madsonic and owncloud both accessable from port 80, kind of like this

Code: Select all

internal  (doesn't much matter but) or  ( i think it lives on 80)

I have tried numerous things but I keep corrupting something and i have to reinstall.

Thanks for any help
Last edited by z-vap on 28 Nov 2015, 15:38, edited 1 time in total.
Posts: 20
Joined: 08 Jun 2013, 12:36
Has thanked: 4 times
Been thanked: 4 times

Re: [Synology] VirtualHost / ProxyPass

Unread postby DoCC » 28 Feb 2015, 18:52

hi !

i do not know how the synology station/system is build.
But if you are able to alter your configuration of your apache demon then there will be no problem.

As i read, you want to set up an apache proxy on port 80 for your madsonic, right ?

1. enable the proxy_module for apache, just ensure that the files proxy.load AND profy.conf are in the "mods-enabled" folder, like here :

Code: Select all
madsonic:~$ ls /etc/apache2/mods-enabled/
access_compat.load  autoindex.conf  mime.conf           proxy_http.load
actions.load        autoindex.load  mime.load           <<<< proxy.load >>>>
alias.conf          deflate.conf    mpm_prefork.conf    rewrite.load
alias.load          deflate.load    mpm_prefork.load    setenvif.conf
auth_basic.load     dir.conf        negotiation.conf    setenvif.load
authn_core.load     dir.load        negotiation.load    status.conf
authn_file.load     env.load        php5.conf           status.load
authz_core.load     fcgid.conf      php5.load
authz_host.load     fcgid.load      <<<< proxy.conf >>>>
authz_user.load     filter.load     proxy_connect.load

2. edit your conf file where the vhosts are set. this can be any file called at the end of the httpd.conf.

the part for proxypassing "?" should read like this :

Code: Select all
<VirtualHost listening-IP:80>
    ServerName listening.domain.blah
        ProxyPass / http://madsonic.ip:4040/
        ProxyPassReverse / http://madsonic.ip:4040/

listening-ip and madsonic-ip can be the same, apache throws an error, if port 80 is already used.
the listening domain is needed if you wantto have other services listening on port 80.

3. save the config file restart apache.

call your internal domain name or the given ip and voila all will be fine
User avatar
Posts: 210
Joined: 25 Feb 2014, 14:41
Location: UpperBavaria : ))
Has thanked: 41 times
Been thanked: 71 times

Re: [Synology] VirtualHost / ProxyPass

Unread postby z-vap » 01 Mar 2015, 17:48

ok thanks.

I will give this scenario a try and let you know
Posts: 20
Joined: 08 Jun 2013, 12:36
Has thanked: 4 times
Been thanked: 4 times

Re: [Synology] VirtualHost / ProxyPass

Unread postby z-vap » 27 Nov 2015, 18:43

I know this response is 8 months late but I do want to make a confirmed note here that I did get this to work.

Here are my steps:

First goto Web Services > Web Applications and Enable Web Station [x]

This will allow -user related httpd configurations. Owncloud requires this to be enabled upon install.

Then ssh into the box and cd to:
Code: Select all

confirm there is a httpd.conf-user created
if you cat, or edit this file using vi near the bottom you should see:

Code: Select all
<VirtualHost *:80>
    Include sites-enabled-user/*.conf

which should load any config files in the sites-enabled-user dir.

Quit out of the file and cd to
Code: Select all

and vi any file name, I chose httpd-custom.conf

and enter:
Code: Select all
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

<Location /madsonic>

save the config file, exit, and restart apache user interface.
Code: Select all
/sbin/initctl stop httpd-user
/sbin/initctl start httpd-user

Now Stop the Madsonic Application, and go to :
Code: Select all

and edit madsonic.sh, and confirm the port and context_path match the
Location information entered above

Code: Select all

That should be it. Start Madsonic and validate :)
Posts: 20
Joined: 08 Jun 2013, 12:36
Has thanked: 4 times
Been thanked: 4 times

Return to Support 5.x

Who is online

Users browsing this forum: No registered users and 3 guests