0

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?

Joe Bobby
  • 2,803
  • 10
  • 40
  • 59
  • I'm not 100% sure, on how imporant this is, but looking at the [docs](https://httpd.apache.org/docs/2.4/sections.html) it seems like you miss quotation marks here; `` – itzFlubby Jan 14 '20 at 16:16
  • @itzFlubby added `"..."` and made no difference.. any idea what else could be causing the issue? – Joe Bobby Jan 15 '20 at 06:30
  • Have you already disabled the default virtual host config file and enabled your own config files for your sites? The commands should be `sudo a2dissite 000-default.conf` and `sudo a2ensite site1.conf` – itzFlubby Jan 15 '20 at 13:42

0 Answers0