Make a Virtual Host On Centos

11:07 PM 0 Comments

Do you know that that a web hosting provider only have one ip address but have much to handle a domain name. See example bellow:
IP Address web hosting provider is 202.43.187.16
and domain name is handled:
  1. jaringankantor.com
  2. biruvoice.com
  3. ppir.net
And how to make it?
Follow me....
# vim /etc/httpd/conf/httpd.conf
and then
go to end line type :$ and switch to type mode with press i in vi/vim
And add the code bellow:
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin nc.anwar@gmail.dotcom
    DocumentRoot /srv/www/htdocs/jaringankantor # Don't forget this directory must exist
    ServerName jaringankantor.com
    ErrorLog /var/log/jaringankantor.com_log
</VirtualHost>
finish edit with vi/vim and press ESC and save with type :wq.
The last type:
# service httpd restart

Install Server Networking Programming

Support you how to install server, networking and Programming Easy

0 comments:

You can post comment with english language or indonesia language.
Anda bisa memberikan komentar dalam bahasa inggris atau bahasa indonesia.