Oliver Gorwits > App-Netdisco-2.018000 > App::Netdisco::Manual::Deployment

Download:
App-Netdisco-2.018000.tar.gz

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: App-Netdisco-2.028000

NAME ^

App::Netdisco::Manual::Deployment - Tips and Tricks for Deployment

Relocating the Installation ^

The installation process installs Netdisco self-contained to your home directory. The target directory can easily be changed by setting the NETDISCO_HOME environment variable, for example:

 export NETDISCO_HOME=/opt/netdisco

Obviously, you'll need to substitute this wherever you see "~" in the installation instructions. The Netdisco application will use this setting itself to locate files and configuration.

Pass Options to the Web Frontend Daemon ^

Simply add any options after the "start" command. See other sections of this document for some examples.

Non-root Hosting ^

Netdisco will assume its web site is hosted at the apex of your server - that is, the document root. To relocate the web application, pass the --path parameter to the web startup script:

 ~/bin/netdisco-web start --path=/netdisco2

Alternatively, can set the path configuration option in your deployment.yml file:

 path: '/netdisco2'

Listening Port for the Web Frontend ^

Pass the --port parameter to any of the web scripts. For example:

 ~/bin/netdisco-web start --port=8080

Listening Address for the Web Frontend ^

Pass the --host parameter to any of the web scripts. For example:

 ~/bin/netdisco-web start --host=127.0.0.1

Behind a Proxy ^

By default the web application daemon starts listening on port 5000 and goes into the background. This is ideal for hosting behind a web proxy (e.g. Apache with mod_proxy).

After enabling the headers, proxy and proxy_http modules in Apache, a suitable configuration would be:

 ProxyPreserveHost On
 ProxyPass / http://localhost:5000/ retry=0 timeout=5
 ProxyPassReverse / http://localhost:5000/
 
 ProxyRequests Off
 <Proxy *>
   Order allow,deny
   Allow from all
 </Proxy>

To combine this with Non-root Hosting as above, simply change the paths referenced in the configuration, and set path in your deployment.yml as discussed above. Note there is no trailing slash in the Apache config:

 ProxyPass /netdisco2 http://localhost:5000/netdisco2 retry=0 timeout=5
 ProxyPassReverse /netdisco2 http://localhost:5000/netdisco2

To delegate user authentication to Apache, use the trust_remote_user or trust_x_remote_user settings. See App::Netdisco::Manual::Configuration for more details.

SSL Support ^

There is no SSL support in the built-in web server. This is because it's not straightforward to support all the SSL options, and using port 443 requires root privilege, which the Netdisco application should not have.

You are instead recommended to run netdisco-web behind a reverse proxy as described elsewhere in this document. Apache can easily act as an SSL reverse proxy.

Further Reading... ^

Other ways to run and host the web application can be found in the Dancer::Deployment page. See also the plackup and starman documentation.

syntax highlighting: