This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
blurps:armbian-webserver [2023/11/14 20:25] – created yavannah | blurps:armbian-webserver [2023/11/14 20:37] (current) – [1. Initial Setup] yavannah | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
- | markdown | ||
- | |||
===== Debian Armbian Webserver Setup ===== | ===== Debian Armbian Webserver Setup ===== | ||
===== 1. Initial Setup ===== | ===== 1. Initial Setup ===== | ||
- | - **Download and Prepare Armbian Image:** | + | **Download and Prepare Armbian Image:** |
- Download an Armbian image from [[https:// | - Download an Armbian image from [[https:// | ||
- Write the image to a storage device (e.g., SD card). | - 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. | - Connect the device to the server, power it up, and log in via SSH. | ||
- | | + | bash |
ssh root@< | ssh root@< | ||
- | # Password: 1234 (or as stated at the source) | ||
- | | + | Password is 1234 (or as stated at the source). |
+ | Follow on-screen instructions to complete the initial setup. | ||
===== 2. Installing Webmin ===== | ===== 2. Installing Webmin ===== | ||
- | bash | + | |
- | # Install Webmin | + | |
- | curl -o setup-repos.sh https:// | + | curl -o setup-repos.sh https:// |
- | sh setup-repos.sh | + | sh setup-repos.sh |
- | apt-get install webmin --install-recommends | + | apt-get install webmin --install-recommends |
===== 3. Network Configuration ===== | ===== 3. Network Configuration ===== | ||
- | | + | Use armbian-config for static IP configuration or edit / |
- | | + | |
- | | + | |
- | ifconfig eth0 192.168.10.206 netmask 255.255.255.0 | + | ifconfig eth0 192.168.10.206 netmask 255.255.255.0 |
- | route add default gw 192.168.10.1 eth0 | + | route add default gw 192.168.10.1 eth0 |
- | | + | Reboot and log in with the new IP. |
===== 4. NFS Drive Preparation (Optional) ===== | ===== 4. NFS Drive Preparation (Optional) ===== | ||
- | | + | If using an NFS drive: |
- | | + | |
- | mkdir /var/www | + | |
Add the following line to /etc/fstab: | Add the following line to /etc/fstab: | ||
- | ruby | + | <NFS server IP>:/ |
- | 192.168.10.15:/ | + | Reboot or use mount -a to mount the new drive. |
- | + | ||
- | 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:// | + | |
- | tar xzvf dokuwiki-stable.tgz | + | |
- | mv dokuwiki-* / | + | |
- | chown -R www-data: | + | |
- | + | ||
- | ===== 6. Apache Virtual Server Configuration ===== | + | |
- | + | ||
- | Setup Apache webservers via Webmin, configuring port 80 for HTTP and port 443 for HTTPS. | + | |
- | + | ||
- | Alternatively, | + | |
- | + | ||
- | bash | + | |
- | + | ||
- | scp -r root@192.168.10.206:/ | + | |
- | scp -r root@192.168.10.206:/ | + | |
- | scp -r root@192.168.10.206:/ | + | |
- | + | ||
- | ===== 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 | + | |
- | / | + | |
- | + | ||
- | Sources: | + | |
- | + | ||
- | [[https:// | + | |
- | [[https:// | + | |
- | [[https:// | + | |
- | [[https:// | + | |
- | + | ||
- | + | ||
- | ---- | + | |
- | + | ||
- | + | ||
- | ====== 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@< | + | |
- | # 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:// | + | |
- | sh setup-repos.sh | + | |
- | apt-get install webmin --install-recommends | + | |
- | + | ||
- | ===== 3. Network Configuration ===== | + | |
- | + | ||
- | + | ||
- | Use armbian-config for static IP configuration or edit / | + | |
- | + | ||
- | bash | + | |
- | + | ||
- | # Example / | + | |
- | 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 / | + | |
- | + | ||
- | ruby | + | |
- | + | ||
- | 192.168.10.15:/ | + | |
- | + | ||
- | | + | |
===== 5. Prepare for Dokuwiki ===== | ===== 5. Prepare for Dokuwiki ===== | ||
+ | bash | ||
- | 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:// | ||
+ | tar xzvf dokuwiki-stable.tgz | ||
+ | mv dokuwiki-* / | ||
+ | chown -R www-data: | ||
- | apt update | + | Respectively use the directories where you want to store the new webpages. |
- | apt install php libapache2-mod-php php-xml php-mbstring php-zip php-intl php-gd apache2 | + | |
- | systemctl restart apache2.service | + | |
- | wget https:// | + | |
- | tar xzvf dokuwiki-stable.tgz | + | |
- | mv dokuwiki-* / | + | |
- | chown -R www-data: | + | |
===== 6. Apache Virtual Server Configuration ===== | ===== 6. Apache Virtual Server Configuration ===== | ||
+ | Setup Apache webservers via Webmin, configuring port 80 for HTTP and port 443 for HTTPS. | ||
- | Setup Apache webservers via Webmin, configuring port 80 for HTTP and port 443 for HTTPS. | + | Use Webmin's homepage |
- | + | Setup Apache webservers via webmin: | |
- | Alternatively, copy Apache configs from the existing server: | + | * for future simplicity in maintenance, |
- | + | | |
- | | + | * port 443 for https:// |
- | + | | |
- | scp -r root@192.168.10.206:/ | + | |
- | scp -r root@192.168.10.206:/ | + | |
- | scp -r root@192.168.10.206:/etc/apache2/ | + | |
===== 7. Certbot Installation and Configuration ===== | ===== 7. Certbot Installation and Configuration ===== | ||
+ | bash | ||
- | bash | + | |
- | + | ||
- | apt install certbot python3-certbot-apache | + | |
Run Certbot for each virtual server: | Run Certbot for each virtual server: | ||
- | bash | + | |
- | certbot --apache -d your_domain -d www.your_domain | + | |
Verify renewal process: | Verify renewal process: | ||
- | bash | + | |
- | sudo certbot renew --dry-run | + | |
+ | |||
+ | And check the websites via the ( router-configured ) Dynamic DNS hostnames! | ||
===== 8. Activate PHP in Apache2 ===== | ===== 8. Activate PHP in Apache2 ===== | ||
+ | Was needed for us as we f'd up earlier, should not be needed: | ||
- | bash | + | |
- | # In case of issues | + | |
- | apt purge libapache2-mod-php | + | apt purge libapache2-mod-php |
- | apt install php8.2-fpm | + | apt install php8.2-fpm |
- | apt install libapache2-mod-php | + | apt install libapache2-mod-php |
- | / | + | / |
===== Sources ===== | ===== Sources ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | Webmin Documentation | ||
- | Let's Encrypt on Debian 11 | ||
- | Certbot Instructions | ||
- | Install PHP 8.2 with Apache on Debian 11 |