Server configuration files and bash scripts for managing a virtual host server.
Go to file
2024-03-14 15:23:53 -07:00
bin work on verbose mode output 2023-10-06 13:40:14 -07:00
etc new apache-scan fail2ban filter 2023-05-05 15:07:47 -07:00
html add phpMyAdmin config file 2022-07-19 12:55:42 -07:00
libexec change license from MIT to GPL 3.0+ 2022-08-22 13:22:16 -07:00
sbin change license from MIT to GPL 3.0+ 2022-08-22 13:22:16 -07:00
systemd rework systemd stuff - missed one file in previous update 2023-12-21 11:19:18 -08:00
COPYING change license from MIT to GPL 3.0+ 2022-08-22 13:22:16 -07:00
install.sh check for dpkg lock, update mysql checks 2024-03-14 15:23:30 -07:00
README.md update mail server install info 2024-03-14 15:23:53 -07:00
update.sh rework systemd stuff 2023-12-20 10:07:20 -08:00

Vhost Stack

Requirements

A minimal Ubuntu 22.04 server install. It is recommended to first install base-stack which will configure a basic server set up including firewald & fail2ban to secure the server: https://git.stack-source.com/msb/base-stack

Install

cd /usr/local/src/
git clone https://git.stack-source.com/msb/vhost-stack.git
cd vhost-stack
bash install.sh

Apache mod_macro gets configured with a ServerAlias for a subdomain of the domain name of this server. The idea is to have development hostnames that you can use before updating DNS when migrating existing sites. Check the ServerAlias configs in /etc/apache2/mods-available/macro.conf to make sure they are using the domain you wish, and optionally change or comment out the subdomain ServerAlias settings.

Let's Encrypt

For integrated Let's Encrypt certificate configuration install Let's Encrypt Tools: https://git.stack-source.com/msb/letsencrypt-tools

WordPress

If you will be installing WordPress sites then install WordPress Tools: https://git.stack-source.com/msb/wordpress-tools

Mail Server

For an integrated and full featured mail server configuration it's recommended to install vmail-stack: https://git.stack-source.com/msb/vmail-stack If you just want a minimal smtp mail server for getting automated emails (cron, website contact forms, etc.) off the server you can install and configure exim4-daemon-light with the commands below. Note if you started with base-stack this has already been done.

apt -y install exim4-daemon-light mailutils
sed -i "s|dc_eximconfig_configtype='local'|dc_eximconfig_configtype='internet'|g" /etc/exim4/update-exim4.conf.conf
/usr/sbin/update-exim4.conf
systemctl restart exim4
echo "user@example.com" > /root/.forward

License

Copyright (c) 2022 Matthew Saunders Brown matthewsaundersbrown@gmail.com
GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)