pnp-zone

module
v0.0.0-...-942f3f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2022 License: GPL-3.0

README

PNP Zone

Compile from source

Requirements
  • go Version 1.18
  • rust

Go: As of now, Debian 11 ships with golang version 1.15. Follow the offical installation instructions to install the current version.

Rust: The same problem rises with the installation of rust. Follow the installation instructions from rust.

With rustup installed, wasm-pack can be installed:

apt update && apt install build-essential
cargo install wasm-pack
Compilation

First of all, clone pnp-zone as well as its submodules:

git clone https://github.com/pnp-zone/pnp-zone.git --recursive && cd pnp-zone

Now, compile and install pnp-zone and its submodules:

make && make install

Configuration

To configure pnp-zone, copy /etc/pnp-zone/example.config.toml to /etc/pnp-zone/config.toml and modify it to match your needs.

Note: If you use the X-Forwarded-Proto Header, make sure to only add the header on the proxy, that is used for SSL offloading.

After changing the configuration, pnp-zone has to be reloaded:

systemctl reload pnp-zone
Reverse Proxy

It is recommended to deploy pnp-zone behind a reverse proxy. Nginx is used as reference.

Install nginx:

apt-get install nginx

Copy nginx configuration file:

cp pnp-zone.nginx /etc/nginx/sites-available/pnp-zone.conf
ln -s /etc/nginx/sites-available/pnp-zone.conf /etc/nginx/sites-enabled/

Set SERVER_NAME to the vhost, your server can be accessed by:

sed -i -E 's/SERVER_NAME/your-server-name/' /etc/nginx/sites-available/pnp-zone.conf

Set CERT_PATH and CERT_KEY_PATH to a certificate, that is valid for SERVER_NAME:

sed -i -E 's/CERT_PATH/\/path\/to\/cert\.pem/' /etc/nginx/sites-available/pnp-zone.conf
sed -i -E 's/CERT_KEY_PATH/\/path\/to\/key\.pem/' /etc/nginx/sites-available/pnp-zone.conf

Finally, start nginx:

systemctl start nginx

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL