Adding Virtual Host
Initially, we will have to create virtual host's directory. Naming it as myFirstWebsite as an example here.
In the command line, run the following commands.
mkdir /var/www
cd /var/www
mkdir myfirstwebsite/{conf,html,logs}
chown lsadm:lsadm myfirstwebsite/conf
Next, goto Virtual Hosts section and click on the "+" icon.
Virtual Host Root * == /var/www/myfirstwebsite/
Config File * == $SERVER_ROOT/conf/vhosts/myfirstwebsite/vhconf.conf
Hit save
Next, click on "CLICK TO CREATE"
Set both these values to YES,
Save the changes and go back to Virtual Host's configurations and specify the document's root,
Create and Assign Listeners
You can have one listener to listen on all local IP addresses, or you can create multiple listeners with each listener only listening to a specific IP address. Many users will find it simpler to have one listener that is then mapped to different domains, but having multiple listeners can be useful if, for example, you wish to set aside certain server processors for certain sites or conduct special functions on separate ports.
We shall just set default listener in our case (that listens to all IPs on port 80)
Then add new mapping:
Input the domain for the virtual host ("your.domain" will match both "www.your.domain" and "your.domain")
Graceful Restart
Once these configuration has been modified, perform a graceful restart to apply the changes.
This concludes adding Virtual Host.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS