vhost-stack/README.md

46 lines
2.2 KiB
Markdown
Raw Normal View History

2021-05-06 13:43:18 -07:00
# Vhost Stack
2021-04-04 13:28:22 -07:00
This package installs & configures the Apache web server for hosting multiple websites on a server.
2024-03-14 15:23:53 -07:00
## 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
2021-04-21 10:06:23 -07:00
## Install
```
cd /usr/local/src/
git clone https://git.stack-source.com/msb/vhost-stack.git
cd vhost-stack
bash install.sh
```
2021-04-04 13:28:22 -07:00
2021-05-06 13:43:18 -07:00
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.
2021-04-04 13:28:22 -07:00
The default website page is /srv/www/html/index.html. You can edit this page to suit your needs. This default page is displayed for any domain that points to the server, but has not been enabled as it's own VirtualHost yet.
2021-05-06 13:43:18 -07:00
## 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:
2021-05-06 15:51:32 -07:00
https://git.stack-source.com/msb/vmail-stack
2024-03-14 15:23:53 -07:00
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.
2021-05-06 13:43:18 -07:00
```
2021-04-15 09:31:24 -07:00
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
2024-03-14 15:23:53 -07:00
echo "user@example.com" > /root/.forward
2021-05-06 13:43:18 -07:00
```
2022-08-22 13:22:16 -07:00
## 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)