I am just a beginner. I have installed an Ubuntu virtual server 14.03 on a widows 8.1 host.I have lamp server ,phpmyadmin installed and working fine. I can access files on both the host and guest machine through putty and winsp. I just want to know for a start how host web pages from the host and access them from the browser. Please help.
Go to browser and type http://localhost/, it's a default virtual host and files located in /var/www/html directory. For creating simple virtual host like example-com, follow these steps:
Open /etc/hosts and add to the end
Create directory /var/www/example-com:
sudo mkdir /var/www/example-com.
Copy index.html and other files from /var/www/html to /var/www/example-com.
Create example-com.conf in /etc/apache2/sites-available and add this code:
<VirtualHost *:80> ServerName example-com ServerAlias example-com DocumentRoot /var/www/example-com <Directory /var/www/example-com> AllowOverride All Require all granted </Directory> </VirtualHost>
Enable virtual host:
sudo a2ensite example-com.conf.
sudo service apache2 reload.
Go to browser and type http://example-com/.