setting up domain name - apache

i'm new at webhosting. I'm trying to set up a small website and i have bought a domain name www.example.com. I have a vps running centos 5 with apache and direct admin. However i am not sure how to make the domain name i bought link to the ip address of my server, so that when someone types www.example.com it takes them to my website.
Also, is it difficult to set up an e-mail address such as me#www.example.com? Thanks for your advice.

When you buy a domain name, you need to tell the registrar which name servers you use. Probably your hosting provider did that for you. He also administers the name servers, but might give you limited permissions to modify your records. Ask him for details.

Related

DNS: Do i need to create a DNS entry to represent each of my web applications running in a same windows server under IIS?

Updated the question:
Assume that i run several web applications in one windows server under IIS. As you know, for the several web applications to co-exist in IIS, i need to differentiate them using a hostname, ip address or port combinations. Assuming that i go with defining a hostname binding unique for each of the web applications, do i need to create a DNS entry for the hostnames to be resolved?
There are three different sites i host in IIS in the same windows server. I can not allocate different ip address to each of my dev sites so i chose to use unique host names for each of the sites thus
api-orders.dev
api-catalog.dev
api-products.dev
etc..
api - indicates it is a web api.
orders | catalog | products - indicate it is an application serving a business department.
dev - indicates it is my development site.
My organization has several domains such as usdev.org.com, us.org.com, uk.dtt.org.com and more like.
Assuming that my Dev servers are hosted in the usdev.org.com domain. I should be able to request my hypothetical sites from within and also outside of the usdev.org.com domain
right now, when i use the below urls, i am not able to hit the site within or outside the domain. Not even from the web server where the sites are hosted. I ask this question to several people and could not get a clear response.
DO i need to create DNS entries corresponding to the hostname IIS binding of each site in order to solve this issue?
api-orders.dev.computer-name.domain.com
api-catalog.dev.computer-name.domain.com
api-products.dev.computer-name.domain.com
What kind of setup i need to acheive this?
If you just want to access the website via your Active directory. I think you shouldn't include servername in your domain name.
Because in common AD DNS Forward Lookup Zone.
You should have a primary zone called domain.com. Your web server will displayed as a HOST(A) Servername and its FQDN will be servername.domain.com.
Then you could create a CNAME api-orders.dev and map it to your servername.domain.com. The FQDN should be api-orders.dev.domain.com.
Finally you have to set the domain into IIS binding so that IIS can share 80 port for mutiple sites.
Since your cname api-orders.dev will not be considered as a seperate website, you have to input FQDN instead of CNAME.
If you want to access the website from internet, then you may need to purchase public domain from domain provider and map it to your server's public IP address.

Domain name and Dynamic IP Addresse

I have recently acquired a domain name from GoDaddy. At home i am trying to setup a nextcloud server. Since my ISP serves me a dynamic IP addresse i had to create another domain name on no-ip website. Furthermore, i want to forward http requests to https. The following questions rises:
Do i create the ssl certificate (with let’s encrypt) for the godaddy domain or the no-ip domain?
What is the correct forwarding sequence here? Assume godaddy is foo.com and no-ip bar.dyndns.me and the user types foo.com, my server apache settings would forward foo.com:80 to :443 but this i guess should be corrected to my dyndns. I am confused.
I would appreciate any help - thank you.
you are making it too complicated. Instead of using a redirect you should request a static ip from you isp. this costs money varying by your provider but then you only need one domain. you then apply the ssl certificate to that domain and enforce ssl only with your hosting server (i.e apache, iis).
You can write a simple app/script to manage the Dynamic DNS from your server using the GoDaddy Api, thats what i have been doing for ~3 years now as my ISP want a stupid amount for a static IP. I have mine pinging out every 10 mins to check if my IP changed (ISP sucked for a while and mine would change several times a day)
Here are some links to various implementations of the GoDaddy API
BASH
Python
Powershell
So I think I have a fix for this, before I give you my answer I will outline problems with other solutions.
Static IP from your ISP. The problem with this is it may cost too much. (However if it’s cheap I’d probably do this solution)
Script and update godaddy DNS. This is okay however only if you can allow for some outage time between changes. (The DNS will take time to Propagate up to 24 hours)
Upgrade your noip account to a plus managed DNS it costs $29.95 a year. However it will allow you to bring your own domain name from another provider like go daddy. Depending how often your noip client is running there could be a very small outage between changes.
https://www.noip.com/support/knowledgebase/can-i-use-my-own-domain-name-with-no-ip/

Web site not accessible when "www" is not used

I have a web domain registered and a hosting space.
When I access my website with www (for ex. www.example.com) it shows expected content. However when I try to access it without www (for ex. example.com) it shows site under construction page. This site under construction page is provided by web hosting provider and is html file.
What changes are required for accessing site both ways?
setup an A-record for the domain name without the 'www' prefix pointing to the IP address of
the web-server, and setup a CNAME-record for the domain name with the 'www' prefix pointing
to the web-server IP.
use a CNAME record for "www" to point it to the base name. Use an A record for the base name.
But I find it easier (and it's ever so slightly faster for users) to simply use an A record for both the base name and www.
Creating A record and CNAME record usually is the solution - but on your authoritative DNS.
You will want to put A and/or CNAME records into master DNS, not secondary DNS. There are two approaches to DNS which are:
authoritative DNS (master DNS)
local DNS (usually resides on your host machine/router) (secondary DNS)
Indeed - it is not simple as it may seemed. To have your own working authoriative DNS, you need 2 host machines physcially connected to two different separated ip addresses (eth0 physical connect - not virtually bridged). Since this is so complicated and time-consuming implemention, it is typical to outsource master DNS to a DNS provider (and is a common practice among many of us).
I have 4 servers on my one ip, and my local DNS are being managed in between my router and 4 host machines and it works great on local network ONLY. Since I wanted the local network to be hooked to my domain, I outsourced my master DNS to http://dnsimple.com (there are other DNS provider competitors), so it'd manage my domain directly. This therefore functions as an authoritative DNS, known as master DNS.
The issue you are trying to fix should be focused toward master DNS, not secondary DNS (local network) as it'd not work. If you got your domain via a registrar company or a web-hosting company, you should be able to find the setting/management on your account with the company (for example, C-Panel)...not DNS on your local network.
EDITED: This is a tool that I always use and is a great benefit in tackling down DNS / Domain issues. I dont know what I'd have done without it. http://www.dnsstuff.com/tools

Finding domain names from IP addresses in Apache access.log

I am using Webalizer on ubuntu to generate apache access.log reports for my site. Webalizer just gives me the ip address from where my site was accessed. I want the domain names for the ip addresses that are retrieved.
Is there any way to get the domain names? Is there some other tool that I need to use? I tried using Awstats but my server admin told me not to because it changes access rights of various different files. I cannot use google analytics or piwik as well.
I tried nslookup but how can i use nslookup on the access.log file? I don't know how to do this. Can anyone help me out?
If you just want to see the registered domain of one IP address, copy and paste the IP address into the upper right field at arin.net
If you have a bunch of IP addresses to look up, there are other web analytics software products you can use - check out Angelfish Software.

simple domain question

Hi everyone I'm a new apache tomcat user I have question regarding seting up a domain name I'm kinda confused about that and how do I know what is my current domain name? can I change the domain name ? I looked into the apache documentations but it was not clear
Thank you in advance
Lava
This question sounds a lot like it's asking about domain name registration and DNS hosting rather than anything tomcat specific.
Your current domain name is probably given to you by whoever hosts your server if you're using public address space. If it's a Unix/Linux box you can find out what that is (assuming things are configured sanely) from a shell using
hostname -A
If you only know the IP address you can make a reverse lookup to find a DNS name that probably points back to your server.