I'm trying to set up Apache2 server. Installation and configuration seemed to go well, but when I try to go to my custom web URL I get "This site can't be reached" error. I've tried setting config file up through this answer - Forbidden 403 error when trying to access Apache 2.4.7 web server in browser .
My hosts file looks like this:
127.0.0.1 localhost
127.0.0.1 justtestingthis
127.0.1.1 Hacker
# The following lines are desirable for IPv6 capable hosts
...
My apache2/sites-available/http.justtestingthis.conf
file looks like this:
<VirtualHost 127.0.0.1:80>
ServerAdmin [email protected]
ServerName justtestingthis.com
ServerAlias www.justtestingthis.com
DocumentRoot /home/donatas/Desktop/Projects/justtestingthis/dist/src
DirectoryIndex index.php
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /home/donatas/Desktop/Projects/justtestingthis/dist/src>
# Allow .htaccess
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
I've also created a link of this file in apache2/sites-enabled
using sudo a2ensite http.justtestingthis.conf
.
When I'm accessing the website by just typing in http://localhost my website is being found sucessfully, but when I'm trying to access it through justtestingthis.com or www.justtestingthis.com I'm getting the "This site can't be reached error"...
What am I doing wrong?