User Tools

Site Tools


blurps:armbian-webserver

This is an old revision of the document!


markdown

Debian Armbian Webserver Setup

1. Initial Setup

- Download and Prepare Armbian Image:

  1. Download an Armbian image from Armbian.com.
  2. Write the image to a storage device (e.g., SD card).
  3. Connect the device to the server, power it up, and log in via SSH.
```bash
ssh root@<new_armbian_system_IP_or_name>
# Password: 1234 (or as stated at the source)
  Follow on-screen instructions to complete the initial setup.

2. Installing Webmin

bash

# Install Webmin curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh sh setup-repos.sh apt-get install webmin –install-recommends

3. Network Configuration

  Use armbian-config for static IP configuration or edit /etc/rc.local as a last resort.
  bash
  # Example /etc/rc.local (if needed)
  ifconfig eth0 192.168.10.206 netmask 255.255.255.0
  route add default gw 192.168.10.1 eth0
      Reboot and log in with the new IP.

4. NFS Drive Preparation (Optional)

  If using an NFS drive:
  bash

mkdir /var/www

Add the following line to /etc/fstab:

ruby

  192.168.10.15:/volume1/WEBSERVER /var/www nfs _netdev,nofail,rw 0 0
  Reboot or use mount -a to mount the new drive.

5. Prepare for Dokuwiki

bash

apt update apt install php libapache2-mod-php php-xml php-mbstring php-zip php-intl php-gd apache2 systemctl restart apache2.service wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz tar xzvf dokuwiki-stable.tgz mv dokuwiki-* /var/www/html/dokuwiki chown -R www-data:www-data /var/www/html/dokuwiki

6. Apache Virtual Server Configuration

  Setup Apache webservers via Webmin, configuring port 80 for HTTP and port 443 for HTTPS.
  Alternatively, copy Apache configs from the existing server:
  bash
  scp -r root@192.168.10.206:/etc/apache2/sites-*  /etc/apache2/
  scp -r root@192.168.10.206:/etc/apache2/conf-*   /etc/apache2/
  scp -r root@192.168.10.206:/etc/apache2/mods-*   /etc/apache2/

7. Certbot Installation and Configuration

bash

apt install certbot python3-certbot-apache

Run Certbot for each virtual server:

bash

certbot –apache -d your_domain -d www.your_domain

Verify renewal process:

bash

sudo certbot renew –dry-run

8. Activate PHP in Apache2

bash

# In case of issues apt purge libapache2-mod-php apt install php8.2-fpm apt install libapache2-mod-php /usr/bin/php -v

Sources:

  [[https://webmin.com/docs/modules/apache-webserver/|Webmin Documentation]]
  [[https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-debian-11|Let's Encrypt on Debian 11]]
  [[https://certbot.eff.org/instructions?ws=apache&os=debianbuster|Certbot Instructions]]
  [[https://www.cyberciti.biz/faq/install-php-8-2-with-apache-on-debian-11-linux/|Install PHP 8.2 with Apache on Debian 11]]

Debian / Armbian Webserver Setup

1. Initial Setup

  Download and Prepare Armbian Image:
      Download an Armbian image from Armbian.com.
      Write the image to a storage device (e.g., SD card).
      Connect the device to the server, power it up, and log in via SSH.
  bash
  ssh root@<new_armbian_system_IP_or_name>
  # Password: 1234 (or as stated at the source)
      Follow on-screen instructions to complete the initial setup.

2. Installing Webmin

bash

# Install Webmin curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh sh setup-repos.sh apt-get install webmin –install-recommends

3. Network Configuration

  Use armbian-config for static IP configuration or edit /etc/rc.local as a last resort.
  bash
  # Example /etc/rc.local (if needed)
  ifconfig eth0 192.168.10.206 netmask 255.255.255.0
  route add default gw 192.168.10.1 eth0
      Reboot and log in with the new IP.

4. NFS Drive Preparation (Optional)

  If using an NFS drive:
  bash

mkdir /var/www

Add the following line to /etc/fstab:

ruby

  192.168.10.15:/volume1/WEBSERVER /var/www nfs _netdev,nofail,rw 0 0
  Reboot or use mount -a to mount the new drive.

5. Prepare for Dokuwiki

bash

apt update apt install php libapache2-mod-php php-xml php-mbstring php-zip php-intl php-gd apache2 systemctl restart apache2.service wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz tar xzvf dokuwiki-stable.tgz mv dokuwiki-* /var/www/html/dokuwiki chown -R www-data:www-data /var/www/html/dokuwiki

6. Apache Virtual Server Configuration

  Setup Apache webservers via Webmin, configuring port 80 for HTTP and port 443 for HTTPS.
  Alternatively, copy Apache configs from the existing server:
  bash
  scp -r root@192.168.10.206:/etc/apache2/sites-*  /etc/apache2/
  scp -r root@192.168.10.206:/etc/apache2/conf-*   /etc/apache2/
  scp -r root@192.168.10.206:/etc/apache2/mods-*   /etc/apache2/

7. Certbot Installation and Configuration

bash

apt install certbot python3-certbot-apache

Run Certbot for each virtual server:

bash

certbot –apache -d your_domain -d www.your_domain

Verify renewal process:

bash

sudo certbot renew –dry-run

8. Activate PHP in Apache2

bash

# In case of issues apt purge libapache2-mod-php apt install php8.2-fpm apt install libapache2-mod-php /usr/bin/php -v

Sources

  Webmin Documentation
  Let's Encrypt on Debian 11
  Certbot Instructions
  Install PHP 8.2 with Apache on Debian 11
blurps/armbian-webserver.1699993507.txt.gz · Last modified: 2023/11/14 20:25 by yavannah