diff --git a/README.md b/README.md index f477adc..183d105 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ This PHP Web interface allow it's users to manage 3 services, that can be used t * A domain registry * A nameserver * An hypertext service, that allow a directory containing hypertext documents to be accessed with the choice of the protocol and the routing method : - * HTTP(S) or Gemini - * DNS access or Onion (the Tor's system) +* HTTP(S) or Gemini +* DNS access or Onion (the Tor's system) ## Setup @@ -24,9 +24,48 @@ Niver will use and need specific configuration for To do root-level actions, Niver will also use a privileged binary, written in Rust, called Maniver. -The current officiel Niver instance runs with Debian 10, bringing Nginx 1.14.2 and OpenSSH 7.9p1. +Niver has been deployed on the following distributions : -Tor, Knot and Gmnisrv are the latest available version. +* Debian 10, using Nginx 1.14.2 and OpenSSH 7.9p1, and latest available version of Tor, Knot and gmnisrv using their official release channel. +* Arch Linux + +To provide all features: + +`# pacman -S tor knot openssh sudo nginx nginx-mod-headers-more certbot certbot-nginx php-fpm php-sqlite` + +To limit users storage: + +`# pacman -S quota-tool` + + +### maniver installation + +``` +# pacman -S rustup git +$ rustup default stable +$ git clone https://code.antopie.org/miraty/maniver-dev +$ cd maniver-dev +$ cargo build --release +``` + +### gmnisrv installation + +``` +# pacman -S make git pkgconf openssl scdoc +$ git clone https://git.sr.ht/~sircmpwn/gmnisrv # Download gmnisrv sources +$ mkdir gmnisrv/build +$ cd gmnisrv/build +$ ../configure --prefix=/usr # Check gmnisrv dependencies and setup files needed for building +$ make # Build gmnisrv +# make install # Install gmnisrv binary and manpages on the system +``` + +`# useradd -U -r -s /usr/bin/nologin gmnisrv` + + +Some tools you might find usefull to manage a server: + +`# pacman -S vnstat htop nload ufw vim man-db curl` ## Features @@ -43,7 +82,7 @@ Tor, Knot and Gmnisrv are the latest available version. * SFTP access * HTTP and Gemini * IPv4 and IPv6 -* TLS 1.2 & 1.3 and TLS 1.3 only +* TLS 1.2 & 1.3 or TLS 1.3 only * DNS (ICANN, OpenNIC or anything) and Onion v3 (through Tor) * HTTP/1.1 and HTTP/2 * Let's Encrypt certificate diff --git a/ns/zone.php b/ns/zone.php index 3e7ed0d..3c8a185 100644 --- a/ns/zone.php +++ b/ns/zone.php @@ -21,7 +21,7 @@ if (isset($_POST['domain']) AND isset($_SESSION['username'])) { $stmt->execute(); exec("cp /var/lib/knot/zones/template /var/lib/knot/zones/" . $_POST['domain'] . "zone"); - exec("sed -i 's/maison.atope.art./" . $_POST['domain'] . "/g' /var/lib/knot/zones/" . $_POST['domain'] . "zone"); + exec("sed -i 's/DOMAIN/" . $_POST['domain'] . "/g' /var/lib/knot/zones/" . $_POST['domain'] . "zone"); exec(KNOTC_PATH . " conf-begin"); exec(KNOTC_PATH . " conf-set 'zone[" . $_POST['domain'] . "]'"); diff --git a/top.inc.php b/top.inc.php index 0d623bc..81b3be7 100644 --- a/top.inc.php +++ b/top.inc.php @@ -20,7 +20,7 @@ define("PASSWORD_REGEX", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]{8,1024}| define("SUBDOMAIN_REGEX", "^[a-z]{4,63}$"); define("PREFIX", "/eltrode"); // Prefix in the URL, if any -define("ROOT_PATH", "/var/www/niver" . PREFIX); // Niver directory +define("ROOT_PATH", "/srv/http/niver" . PREFIX); // Niver directory define("DB_PATH", ROOT_PATH . "/db/niver.db"); // Niver SQLite database define("KNOTC_PATH", "/usr/sbin/knotc"); // Binary file define("KEYMGR_PATH", "/usr/sbin/keymgr"); // Binary file