LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2015, 06:05 AM   #1
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Rep: Reputation: 1
How to point a registered domain on Public IP


Hi,

I have a CentOS 7.

I have purchased a new domain name abcxxx.com

I want to configure this domain name on my centOS 7 server

I have installed httpd on centos 7 and my site working fine as localhost but I want to open this site using purchased domain name.

Please help to configure domain name on centos 7.

I will deeply appreciate it.

Thank You

Last edited by unclesamcrazy; 01-10-2015 at 01:35 AM.
 
Old 01-07-2015, 09:07 AM   #2
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: 2 * CentOS 6.9 Self-Hosted Domain Servers (Mail & Web Server / FTP Server)
Posts: 98

Rep: Reputation: Disabled
Hello "UncleSamCrazy",

Firstly the manual pages for httpd should indicate the location of the primary config files, man httpd

Typically the file is called httpd.conf and is normally located at /etc/httpd/conf

http://httpd.apache.org/docs/2.2/mod...tml#servername indicates that the variable / environment variable used to store the domain is called ServerName
so simply substitute the entry in the file containing ServerName www.example.com:80 with ServerName www.YourDomainName.com:80 simply substitute the .com with the appropriate value, i.e. co.uk, etc. 80 here refers to the port no. that you will be serving the pages from, typically port 80

1. Always remember to take a backup copy of any config file before you amend it.
2. After modifying the config file remember to restart the httpd service

Hope that helps.

Regards,

Rawcous!
 
Old 01-07-2015, 01:10 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
In addition to the above, you'll need to configure DNS such that www.abcxxx.com points to the public IP address of your Web server. Do you have DNS servers set up to resolve your domain yet? If not, godaddy and others have DNS services you can use (I remember zoneedit having a free option back in the day, but it's been ages since I've looked).

You'll also need to make sure your firewall is configured to allow traffic on port 80 and port 443 (if using HTTPS) to the server.
 
Old 01-08-2015, 01:20 AM   #4
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
I have done the httpd part as well as opening port 80, 443 in iptables and firewall.

I am facing problem in DNS part, I have a public IP and any one in this world can open my site using this public IP but it is difficult to give people public IP that's why I have purchased domain but how to point this purchased domain to my public IP.

Please help.

Last edited by unclesamcrazy; 01-08-2015 at 02:06 AM.
 
Old 01-10-2015, 01:34 AM   #5
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
I want to point a registered domain on public IP.
Public IP server is centos 7, I have installed BIND on it.
Now How can I point this domain on public IP.
Please help.
 
Old 01-10-2015, 01:57 AM   #6
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,510

Rep: Reputation: 394Reputation: 394Reputation: 394Reputation: 394
You don't need (or want) BIND.
Your registrar (where you got the domain name from) will host the DNS records.
 
Old 01-10-2015, 09:18 AM   #7
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
so when do I need BIND?
 
Old 01-10-2015, 04:41 PM   #8
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Quote:
so when do I need BIND?
Never is my vote, you only need BIND if you really want to run your own DNS server, which can cause lots of headaches from extra DNS problems you don't need. I've hosted public websites for some years without BIND, I use my registrar's DNS servers. They have a nice web-based DNS manager.

You use the DNS manager to add a DNS host record for your site, usually using the www host, pointing to your public IP address.

One more thing, you need to make sure your internet provider isn't blocking http traffic on your internet connection.

Last edited by Doug G; 01-10-2015 at 04:43 PM.
 
Old 01-10-2015, 09:09 PM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,793
Blog Entries: 18

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
You might find it useful to read about "A" Records. Domain registrars are normally responsible for maintaining those.

Doug G gives good advice in post #8. In the US at least, most ISP's prohibit public-facing servers unless you are paying for a "business" connection; some enforce the prohibition more actively than others, usually by blocking port 80.

Last edited by frankbell; 01-10-2015 at 09:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure two domain name in same OS(centos) unibox Linux - Server 13 02-15-2013 11:59 AM
setting up centos as a webserver with a domain name purchased cathycp27 Linux - Newbie 6 07-28-2011 10:16 PM
my purchased domain name used by seller rblampain Linux - General 3 01-02-2006 01:33 AM
Creating nameserver to resolve purchased domain to my computer techrolla Linux - Networking 11 07-30-2004 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration