I'm trying to make a virtual server on my apache server to work with a laravel application:
I made a conf file name "brk.localhost.conf" with the following contents:
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName brk.localhost
ServerAlias www.brk.localhost
DocumentRoot /var/www/html/brokers/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
ran these commands:
sudo a2ensite brk.localhost.conf
service apache2 reload
sudo service apache2 restart
but still when I'm trying to go to "www.brk.localhost" I get:
Server not found
I tried to replace the port number 80 with "brk.localhost" but still not working.
You'd need to add an entry to the hosts file so the browser knows where to look for www.brk.localhost
.
The fastest way to find out how to edit the hosts file on your specific system is to Google how to edit hosts file <name of your operating system>
.