Posts

Showing posts with the label commands

Create Virtual host (vhost) in linux - Ubuntu 18.04, 16.04

Virtual Host is a well-known term in web development. Generally, the remote server where we keep your website code/files is called a hosting server. Similarly, when are working on local system with any installed server like Apache or Nginx, it acts as a host. So to access the website on our system with any a custom domain name like 'yourproject.com' instead of something like 'localhost/yourproject', which sometimes create a problem when accessing relative URLs to base URL of the project. So the best way to create virtual host your local system which we work as the remote website works with a domain name. To Create Virtual Hosts(vhost) for apache2 server in Linux/Ubuntu using terminal follow below steps: 1. Copy default site conf file with the name of the your-website name i.e. laravel-demo.com.conf $ sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/ laravel-demo .conf 2. Open new conf file into an editor with root permission: ...