Posts

Showing posts with the label Linux

Virtual host - ubuntu(linux)

Create(set) virtual host as local domain- ubuntu(linux) Sometimes we need to create a local domain for the sites in our local server. To accomplish this purpose, we need to create a virtual host entry in apache hosts and respectively create its dependencies as well. Example : localhost/myproject => myproject.localhost To meet the above described requirements, we need to follow below steps over your terminal(command-line) considering you are at /(root) directory: 1- Create your site's conf file under the directory : etc/apache2/sites-enabled. Enter command : - sudo cp /etc/apache2/sites-enabled/default.conf /etc/apache2/sites-available/myproject.localhost.conf - sudo nano /etc/apache2/sites-enabled/myproject.localhost.conf Make the changes as defined below: <VirtualHost *:80>         ServerAdmin webmaster@localhost         ServerName myproject.localhost         DocumentRoot /var/www/myproject ...