This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

How to host website on linux server from static IP

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I have application and I have linux system. I have one static IP which is actually a domain name for my website.
Now I want to configure linux system such that when user types my domain name in his/her browser, he/she should be able to access my web application which is actually running on linux system.
In short mapping of static ip to linux system.

thanks in advance. waiting for reply.
 
Saloon Keeper
Posts: 21575
146
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're got things a little backwards there.

The actual network configuration for a TCP/IP-based system (which is what most of them are these days) is done solely via IP addresses. Usually you'll have at least 2 of them defined for each machine, but the localhost address (127.0.0.1) isn't visible outside of the machine itself.

To translate a domain name (such as www.coderanch.com) to the IP address that a client needs to know in order to send requests to your server, you need some sort of lookup facility. There are a number of different ones, but the one that pretty much rules the Internet is DNS (Domain Name Services). This is a "master telephone book" that handles the mapping of a name to an address. Copies of it are distributed all over the Internet.

To get your machine's name/IP address in that "phone book", you need to register it with an accredited Domain Name Registrar. There are a lot of them, including Verisign, register.com GoDaddy, various government agencies (depending on what country you live in, A lot of the hosting service companies will also handle registration. The registration is done for an incremental number of years, after which it expires and becomes fair game for whoever else wants to grab the name (so it's a good idea to renew registration before it expires).

There are several qualifications in addition to this. You cannot just pick an IP address for general Internet use. You need to get one (or more) assigned to you from an upstream provider. For home systems, this is often a dynamic address, which is another story, but if you are have a business account, you can often get a dedicated fixed address.

To use this address, you have to set up Linux networking (ask about it in our Linux/Unix forum), you have to open the port(s) you need in the router and host machine firewalls, and you should be aware that DNS does NOT include port numbers, only IP addresses, so if you have Tomcat's default ports set up, you'll need to either have to A) have user's include the Tomcat potrt number in their UTRLs, B) put a port translation or proxy service ahead of Tomcat or C) reconfigure Tomcat to run on ports 80 and 443 (not recommended, since this requires Tomcat to be root).
 
Prashant Chindhade
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks for your reply.

I got a new router and set a rule in it. if request is came from client about particular domain that router will redirect it to linux server.

thanks
Prashant
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!