I am trying to set up virtual hosts on my laptop (Ubuntu 19.10, Apache/2.4.41) for my convenience. I followed this tutorial, with a few modifications to folder paths but I get this error:
Unable to connect
Firefox can’t establish a connection to the server at modipis.dev.
My configuration file (modipis.conf) is:
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin [email protected]
ServerName modipis.dev
ServerAlias www.modipis.dev
Index file and Document Root (where the public files are located)
DirectoryIndex index.php
DocumentRoot /var/www/html/modip/modipIS/public/
<Directory /var/www/html/modip/modipIS/public/>
Require all granted
AllowOverride All
Options Indexes
</Directory>
Custom log file locations
LogLevel warn
ErrorLog /var/www/html/modip/modipIS/various/logs/modipIS.dev-error_log
CustomLog /var/www/html/modip/modipIS/various/logs/modipIS.dev-access_log combined
</VirtualHost>
and my /etc/hosts
127.0.0.1 localhost
127.0.1.1 laptop
127.0.0.1 modipis.dev
The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
Any idea why this fails?
I also noticed the following:
- when I type modipis.dev, the browser redirects to https://modipis.dev. Is this normal?
- if I type 127.0.0.1 in the browser, it redirects to the modipis site.
.dev
. – pa4080 Jan 30 '20 at 09:33