I am trying to work with my
Laravel installation by using a
VirtualHost on my computer which is using
apache2 web server under debian jessie 8.5.
To do this, I first created a virtual host file named
/etc/apache2/sites-available and put the below text in it:
<VirtualHost /var/www/html/:80> ServerName localhost ServerAlias localhost DocumentRoot /var/www/html/ </VirtualHost> <VirtualHost /var/www/html/laravel40:8000> ServerName lara ServerAlias lara DocumentRoot /var/www/html/laravel40/ </VirtualHost>
Now, after restarting the apache2 service, I can view the
localhost easily by typing it in the browser's address bar. But with typing
lara in the address bar, the browser shows me (chrome in my case) the results of search about the word lara. Laravel needs port
8000 to be run but I want it to run on
port 80 so that the return results of my gateway system could work correctly.