We always require to create virtualhost on each project because we don't want to run each project manually, so it is better way to create virtual host address for each project when you development like as bellow:
It will best way to run our project on local system. But if you want to create virtual host on ubuntu, you have to follow several step like site enabled, site enabled config, site directory permission, hosts entry and etc. You have to follow several step on each virtual host create time. I think it take a.....
we always like to create virtual host and run our project that way we can debug properly and run as like our website. But if you are working on ubuntu then we have always follow several step to create virtual host and that very long process.
So, i found one package that provide virtualhost command that way we can create new virtual host and also delete virtual host command. so just follow bellow step:
<strong class="step">Create virtualhost command</strong>
$ cd /usr/local/bin
$ wget -O virtualhost https://raw.githubusercontent.com/RoverWire/virtualhost/master/virtualhost.sh
$ chmod +x.....
Whenever you need to rewrite index.php file from url you can find solution here. you can easily enable rewrite mode using bellow terminal command. when i create one virtualhost for my laravel application and open in browser and open my created virtual url. but when i click on login i found following error :
URL not found....
But when i try add index.php like this way then it works:
You can remove index.php from url so run following command:
<pre class="prettyprint lang-php">
sudo a2enmod rewrite
sudo service apache2 restart