How to attach my domain name to my server IP address (Apache) How to attach my domain name to my server IP address (Apache) apache apache

How to attach my domain name to my server IP address (Apache)


<VirtualHost 109.201.175.107:80>    ServerName   example1.com:80    ServerAlias  www.example1.com    //other options     ServerAdmin  Email Id    DocumentRoot /home/localname/www     # Other directives here     ErrorLog Physical path to error log folder</VirtualHost>

Please Check this for details http://bytes.com/serveradministration/webservers/apache/virtual-hosting/app/dynamic_static_router.html


Your domain name should be mapped with your server public Ip address, this is all required after the configuration that you have made. Ask your dns provider for this.

on ping yourdomainname.com on command prompt, it should resolve your public IP address (109.201.175.107)


Solved for Ubuntu 15.04, I found the appropriate solution and hope it will help you too.

<VirtualHost *:80>    ServerAdmin admin@example.com    ServerName example.com    ServerAlias www.example.com    ServerAlias *.example.com    DocumentRoot /var/www/example.com/public_html    ErrorLog ${APACHE_LOG_DIR}/error.log    CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost> 

Source