pbcaer wrote:
So I don't need to add my static IP there. People enters my domain name and they are redirected to my router, and the router translates the domain name they entered to my local IP,...
Routers don't know from domains. Domains are DNS. Routers care about IP addresses.
and finds where the website is,
The router doesn't know where the web site is. It knows how to get from one IP address to another.
and sends them what they requested.
The IP router gets the packets to the web server, and back again. The web client then sends the target host over the connection, to be received and processed by the web server. As far as IP routers are concerned, this transfer of the web site name is just data payload in the packets. The routers neither know nor care about the contents of the packets. The routers look at IP addresses only.
Apple's tutorial said there should be static IP, and that got me confused.
I haven't looked at the Apple tutorial, so I don't know what they're referring to. For a typical web site, there would be a static IP address in the public IP address space, and a second static IP address at the web server host, and whatever firewall-NAT-router-gateway device in use will need to map packets arriving at the public address to IP packets forwarded to the internal private static IP address, and also smart enough to map returning packets from the web server back to the firewall-NAT-router-gateway device and from there along to the remote web browser.
About NAT, I can access my AirPort Extreme on Server app, and made webservices available on it. So 80 and 443 ports are now available. But why does my website not on ?
I don't use Server.app for that. I manually configure the settings. Check AirPort Utility and confirm the settings are as expected; that packets arriving at the AirPort Extreme are correctly configured for NAT, and being sent to the target web server. Also check that local network traffic is correctly resolving the host name and the IP address — if DNS is incorrect, then local traffic will probably fail to find the web server. Then confirm that the web site is configured in Server.app. Then check the web server logs, and see if there are packets arriving and some problem, or if the packets are not reaching the host. Further IP testing is usually with the command line ping tool; that'll indicate whether connections by IP address and DNS name are both working.
registered a new host, server.mydomain.com. My website will be mydomain.com. Whenever I go to server.mydomain.com, it shows the sample html page which is not in server's website folder, but in mydomain.com folder. Should I create a Server folder inside mydomain.com folder ? Whenever I try to go to mydomain.com it says the server cannot be found. It opens the subdomain, but not the domain itself. I know that you've warned me about registering a seperate domain for server, but for now I wanted to try this.
There's no difference from IP and DNS, whether it's the first or the second host. I'm apparently not effectively communicating the details and the requirements here (and that's entirely on me), so I'm going to bow out of this discussion and allow somebody else to provide assistance. I'll probably just end up confusing things further, and I'd rather not have that happen.
That written, please fix your local DNS services configuration. Until local DNS servers are correct, enabling and configuring further services is something I'd consider premature, and can end up being a waste of time and effort. As services are activated, these DNS configuration issues can enter into the server-specific configuration, and these inital DNS service errors can tend to be pernicious. Restarting from scratch can be easier than clearing these, unfortunately.