diff --git a/Netdisco/Changes b/Netdisco/Changes index c4cb57dd..7e407e88 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -25,6 +25,7 @@ * Phone node icon is a little phone handset * User icon color indicates port_control/admin ability * Buttons for discover/macsuck/arpnip on device details page + * Support 'path' config option as alternative to --path /mountpoint [BUG FIXES] diff --git a/Netdisco/bin/netdisco-web-fg b/Netdisco/bin/netdisco-web-fg index a8de4fa0..201ec04a 100755 --- a/Netdisco/bin/netdisco-web-fg +++ b/Netdisco/bin/netdisco-web-fg @@ -34,7 +34,16 @@ set plack_middlewares => [ ]; use App::Netdisco::Web; -dance; +use Plack::Builder; + +my $app = sub { + my $env = shift; + my $request = Dancer::Request->new(env => $env); + Dancer->dance($request); +}; + +my $path = (setting('path') || '/'); +builder { mount $path => $app }; =head1 NAME diff --git a/Netdisco/lib/App/Netdisco/Manual/Deployment.pod b/Netdisco/lib/App/Netdisco/Manual/Deployment.pod index bdbfb647..1da7b8a6 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Deployment.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Deployment.pod @@ -22,6 +22,11 @@ parameter to the web startup script: ~/bin/netdisco-web --path /netdisco2 +Alternatively, can set the C configuration option in your +C file: + + path: '/netdisco2' + =head1 Behind a Proxy By default the web application daemon starts listening on port 5000 and goes @@ -45,7 +50,7 @@ file: behind_proxy: 1 To combine this with Non-root Hosting as above, simply change the paths -referenced in the configuration like so (and use C<--path> option): +referenced in the configuration like so (and use Non-root Hosting as above): ProxyPass /netdisco2 http://localhost:5000/ ProxyPassReverse /netdisco2 http://localhost:5000/