I setup a LAMP stack on my RaspberryPi with VirtualHosts so I can code in a local environment from my iPad Pro and its been working but when I tried to incorporate github it became an issue when creating a local repo in /var/www/
.
So I found this doc here: https://www.digitalocean.com/community/tutorials/how-to-move-an-apache-web-root-to-a-new-location-on-ubuntu-18-04 and moved the Web Root to /home/pi/dev/
.
the setup is working with 1 site when I visit the IP address of my RPi (192.168.1.5) from safari on my iPad Pro and the browser on the RPi but visiting site1.dev does not work for either.
This is how I have VirtualHosts setup so far.
etc/apache2/sites-available/site1.conf (symlinked to etc/apache2/sites-enabled/site1.conf
:
<VirtualHost *:80>
ServerAdmin name@email.com
Server Name site1.dev
ServerAlias www.site1.dev
DocumentRoot /home/pi/dev/site1
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /home/pi/dev/site1>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
/etc/hosts
:
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi
192.168.1.5 site1.dev
192.168.1.5 site2.dev
192.168.1.5 site3.dev
I restarted apache with sudo systemctl reload apache2
but still can't get site1.dev
, site2.dev
, or site3.dev
to load on my RPi or my safari browser on my iPad Pro.. any suggestions?