I setup an apache server and created a website in: var\www\mywebsite
.
When I type my website name in the browser's address bar, it directs me to the internet. When I disabled the network (as temporal solution) it did not open the website at all. However, the website index
page shows when I type the full directory path in the address bar. I did virtual host by:
$ cd /etc/apache2/sites-available/
$ sudo nano test.com.conf
Then, type:
<VirtualHost *:80>
ServerAdmin carla@localhost
DocumentRoot /var/www/test.com
ServerName test.com
ServerAlias www.test.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
How can I make my website home page opens directly when I write my website name test.com
in the address bar?