devpi-nginx-vhost-config

Example:

# Create vhost config for devpi.
- devpi-nginx-vhost-config:
    path: /etc/nginx/sites-enabled/vhost_devpi.conf
    owner: devpi
    host: dev.frkl.io
    devpi_root: /home/devpi/.devpi/server
    devpi_host: localhost
    devpi_port: 3141
    devpi_proto: http
    use_https: true

Description

n/a

Variables

Name Type Default Description

devpi_host

string localhost

The host where devpi is running.

devpi_port

integer 3141

The port devpi is listening to.

devpi_proto

string http

The devpi server protocol.

devpi_root

string /home/devpi/.devpi/server

The devpi server directory.

hostname

string localhost

The domain-name for the Nginx web-server.

owner

string devpi

The owner of the file.

path

string /etc/nginx/sites-available/vhost_devpi.conf

The path to the config file.

use_https

boolean False

Whether https is used.

Examples

Example 1

Create vhost config for devpi.

Code
- devpi-nginx-vhost-config:
    path: /etc/nginx/sites-enabled/vhost_devpi.conf
    owner: devpi
    host: dev.frkl.io
    devpi_root: /home/devpi/.devpi/server
    devpi_host: localhost
    devpi_port: 3141
    devpi_proto: http
    use_https: true
Description

This here creates a configuration for Nginx to reverse proxy the local devpi service, incl. redirecting all http traffic to https.

Command-line

frecklecute devpi-nginx-vhost-config --help

Usage: frecklecute devpi-nginx-vhost-config [OPTIONS]

  Creates a vhost for devpi on Nginx.

Options:
  --devpi-host DEVPI_HOST       The host where devpi is running.  [default:
                                localhost]
  --devpi-port DEVPI_PORT       The port devpi is listening to.  [default:
                                3141]
  --devpi-proto DEVPI_PROTO     The devpi server protocol.  [default: http]
  --devpi-root DEVPI_ROOT       The devpi server directory.  [default:
                                /home/devpi/.devpi/server]
  --hostname HOSTNAME           The domain-name for the Nginx web-server.
                                [default: localhost]
  --owner OWNER                 The owner of the file.  [default: devpi]
  --path PATH                   The path to the config file.  [default:
                                /etc/nginx/sites-available/vhost_devpi.conf]
  --use-https / --no-use-https  Whether https is used.
  --help                        Show this message and exit.