Hi everybody,
I placed my slimserver behind a reverse proxy, and I would like to change the webroot, I think I found the right document to modify in Slim/Web/HTML.pm
so my interest is to access to the server typing www.myadress.com/slimserver instead of www.myadress.com:9000
in the script HTML.pm I found the following lines corresponding to the webroot access, but as no expert in perl, I can't find the right way to change the webroot, and in the wiki, the script is different.
I tried $params->{'webroot'} = '/'; changed in $params->{'webroot'} = '/slimserver/'; but as said in the wiki it is the "wrong way to do it" and it won't work
Any help to understand where to implement /slimserver/ as webroot will be much granted :-)
Thank you
# Skins
if ($path) {
$params->{'webroot'} = '/';
$path =~ s|^/+||;
if ( !main::WEBUI || $path =~ m{^(?:html|music|video|image|plugins|apps|settings |firmware|clixmlbrowser|index\.html|imageproxy)/}i || Slim::Web::Pages->isRawDownload($pa
# not a skin
} elsif ($path =~ m|^([a-zA-Z0-9]+)$| && $skinMgr->isaSkin($1)) {
main::DEBUGLOG && $isDebug && $log->info("Alternate skin $1 requested, redirecting to $uri/ append a slash.");
$response->code(RC_MOVED_PERMANENTLY);
$response->header('Location' => $uri . '/');
$httpClient->send_response($response);
closeHTTPSocket($httpClient);
return;
} elsif ($path =~ m|^(.+?)/.*|) {
my $desiredskin = $1;
# Requesting a specific skin, verify and set the skinOverride param
main::DEBUGLOG && $isDebug && $log->info("Alternate skin $desiredskin requested");
my $skinname = $skinMgr->isaSkin($desiredskin);
if ($skinname) {
main::DEBUGLOG && $isDebug && $log->info("Rendering using $skinname");
$params->{'skinOverride'} = $skinname;
$params->{'webroot'} = $params->{'webroot'} . "$skinname/";
$path =~ s{^.+?/}{/};
$path =~ s|^/+||;
}
I placed my slimserver behind a reverse proxy, and I would like to change the webroot, I think I found the right document to modify in Slim/Web/HTML.pm
so my interest is to access to the server typing www.myadress.com/slimserver instead of www.myadress.com:9000
in the script HTML.pm I found the following lines corresponding to the webroot access, but as no expert in perl, I can't find the right way to change the webroot, and in the wiki, the script is different.
I tried $params->{'webroot'} = '/'; changed in $params->{'webroot'} = '/slimserver/'; but as said in the wiki it is the "wrong way to do it" and it won't work
Any help to understand where to implement /slimserver/ as webroot will be much granted :-)
Thank you
# Skins
if ($path) {
$params->{'webroot'} = '/';
$path =~ s|^/+||;
if ( !main::WEBUI || $path =~ m{^(?:html|music|video|image|plugins|apps|settings |firmware|clixmlbrowser|index\.html|imageproxy)/}i || Slim::Web::Pages->isRawDownload($pa
# not a skin
} elsif ($path =~ m|^([a-zA-Z0-9]+)$| && $skinMgr->isaSkin($1)) {
main::DEBUGLOG && $isDebug && $log->info("Alternate skin $1 requested, redirecting to $uri/ append a slash.");
$response->code(RC_MOVED_PERMANENTLY);
$response->header('Location' => $uri . '/');
$httpClient->send_response($response);
closeHTTPSocket($httpClient);
return;
} elsif ($path =~ m|^(.+?)/.*|) {
my $desiredskin = $1;
# Requesting a specific skin, verify and set the skinOverride param
main::DEBUGLOG && $isDebug && $log->info("Alternate skin $desiredskin requested");
my $skinname = $skinMgr->isaSkin($desiredskin);
if ($skinname) {
main::DEBUGLOG && $isDebug && $log->info("Rendering using $skinname");
$params->{'skinOverride'} = $skinname;
$params->{'webroot'} = $params->{'webroot'} . "$skinname/";
$path =~ s{^.+?/}{/};
$path =~ s|^/+||;
}