Page 1 of 1

[Synology] VirtualHost / ProxyPass - SOLVED

Unread postPosted: 20 Feb 2015, 13:21
by z-vap
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

Re: [Synology] VirtualHost / ProxyPass

Unread postPosted: 28 Feb 2015, 18:52
by DoCC
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

Re: [Synology] VirtualHost / ProxyPass

Unread postPosted: 01 Mar 2015, 17:48
by z-vap
ok thanks.

I will give this scenario a try and let you know

Re: [Synology] VirtualHost / ProxyPass

Unread postPosted: 27 Nov 2015, 18:43
by z-vap
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/
LoadModule proxy_http_module modules/
LoadModule proxy_connect_module modules/

<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, and confirm the port and context_path match the
Location information entered above

Code: Select all

That should be it. Start Madsonic and validate :)