Creating a custom URL for private network

General discussions.

Moderator: moderators

Creating a custom URL for private network

Postby orav » Mon Mar 02, 2015 5:16 pm

Hi, I've managed to activate subsonic and the users are currently connecting to it via the computer name and port ("orav-pc:4040/" to be exact) but i want to create a much simpler URL like "music/" within the network.
The network is isolated from the internet.
Help anyone? :)
orav
 
Posts: 1
Joined: Mon Mar 02, 2015 5:13 pm

Re: Creating a custom URL for private network

Postby plastikman » Wed Mar 04, 2015 9:04 pm

I have not tested this but it should work.

Create a dns name on the network that points music to the host that is running nginx

use nginx to create a reverse proxy

Code: Select all
upstream subsonic_backend {
    server orav-pc:4040;

    keepalive 600;
}
server {
  listen                *:80 ;

  server_name           proxy;
  access_log            /var/log/nginx/proxy.access.log;

location / {
        proxy_pass http://subsonic_backend$request_uri;
        proxy_read_timeout 90;
        proxy_http_version 1.1;
        proxy_set_header Connection "Keep-Alive";
        proxy_set_header Proxy-Connection "Keep-Alive";
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
plastikman
 
Posts: 51
Joined: Wed Oct 05, 2011 6:03 pm


Return to General

Who is online

Users browsing this forum: No registered users and 27 guests