Skip to content

Installing

Ahwx edited this page Sep 2, 2023 · 6 revisions

Ways to install

Docker/NGINX+PHP

Example for any Debian based GNU/Linux distribution:

Installing dependencies and cloning the repository

apt install php php-fpm php-curl nginx nginx-common git
git clone https://github.com/Ahwxorg/Binternet /var/www/html/binternet
systemctl enable --now nginx php-fpm

Create a reverse proxy rule:

server {
        listen 80;
        server_name binternet.ahwx.org;             # replace this for your domain/subdomain

        root /var/www/html/binternet;
        index index.php;

        location ~ \.php$ {
          include snippets/fastcgi-php.conf;
          fastcgi_pass unix:/run/php/php-fpm.sock;
        }
}

Example for Gentoo GNU/Linux.

echo "dev-lang/php curl fpm sockets threads" >> /etc/portage/package.use/php
echo "app-eselect/eselect-php fpm" >> /etc/portage/package.use/php
echo "app-misc/mime-types nginx" >> /etc/portage/package.use/nginx
emerge -v dev-lang/php www-servers/nginx
rc-update add nginx
rc-update add php-fpm
git clone https://github.com/Ahwxorg/Binternet /var/www/html/binternet

Create a reverse proxy rule:

server {

        server_name binternet.ahwx.org;             # replace this for your domain/subdomain

        root /var/www/html/binternet;
        index index.php;

        location ~ \.php$ {
          try_files $uri $uri/ =404;
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass 127.0.0.1:9000;
          include fastcgi.conf;
        }
}

Docker

Make a file called docker-compose.yaml, or add this as a stack in Portainer. You do not need to clone the repository.

You can, after this, create a reverse proxy rule in your proxy of choice.

version: '3.3'
services:
  binternet:
    ports:
      - '8009:8009'
    container_name: binternet
    image: 'ghcr.io/ahwxorg/binternet:latest'