Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

for example I have a domain name www.example1.com

and I have in my apache conf this code:

<VirtualHost 109.201.175.107:80>
 DocumentRoot /home/localname/www
 ServerName www.example1.com

 # Other directives here

 </VirtualHost>

in the virtual host I wrote my ip and then I attach it to the ServerName is that right?, but anyway when I open the www.example1.com it shows my an error 404, or maybe I need to change the ip address that is attached the domain name, can you tell me step by step what I need to do, I haved searched all the google but didn't understand.

like image 550
BlareStriker Avatar asked Jun 18 '12 06:06

BlareStriker


People also ask

How do I connect my domain to my server IP?

To point your domain name to your dedicated server's public IP address, you need to create an address record for the domain — an A record. An A record is part of the DNS system and it simply maps a domain name to an IP address. An A record is stored as a DNS entry on the domain's name servers.

How do I give my domain name to a local IP address?

To do this, you'll need to create an A Record, which will allow you to point your domains and subdomains to a specific IP address. An A record (or Address record) specifies which IP address is assigned to a particular domain. You can even have multiple A records for the same domain so that you have a backup.


1 Answers

<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

like image 53
Shaik Baba Avatar answered Oct 24 '22 07:10

Shaik Baba