Tutorial: Build a website with your own computer (nat123 peanut shell Dynamic Domain name PC do server)

Source: Internet
Author: User
Tags using git

First PS a bit. Tonight tried the N method, finally found a reliable free use of the method, to modify their own computer to become a server, the external network can also be accessed through the domain name!!!

Things to prepare for:

Tomcat: This is a web container, in fact, this has made the computer become a server, on its own computer can be localhost:8080/xxx to access their own computer Web applications, and others can also be through your IP address xxx.xxx.xx.xx:8080 to access your web App. Specific installation and basic use methods are described in detail in Li Gang's lightweight Java EE book.

nat123: Provide free domain name, domain name Mapping service! This is the focus of the night! Domain name is a string, you in the browser by entering this string, you will automatically connect to the domain name mapped IP address to access the IP address of the computer's content.

Spit the Groove, the following paragraph is not related to the tutorial, you can skip to the red field.

GitHub can do their own web pages, but can only do static Web pages, can not operate the database and so on, if only to do the next blog, you can use GitHub, and faster and more stable more convenient, specific reference: using Git to build my static site-build a basic environment to build a free, Unlimited Traffic Blog----GitHub pages and Jekyll Getting Started

But my data structure curriculum design to database Ah Qaq, can not put on GitHub embrace, after their own blog to consider GitHub

Then find the domain name, can not find public network IP, because the network is the CRC (in addition to the CRC, in fact, most of the domestic is not), each login will change a different IP, so can not use fixed IP, to use dynamic domain name.

And then all over the world are recommended peanut shell, OK, to find peanut shell, there is a god horse "new peanut shell", peat is not free, although the daily draw to send 188 free users, I will hand over the next week ah, I am the trust between people are not, ghosts know is not really sent Ah, Disappointment when suddenly found peanut shell has an old version, "Peanut Shell 6.0", decisive download, good, this goods can be free to use, and then got a peanut shell free domain, ran a bit, inexplicably not on, do not know why. Later on the Internet continue to find, said pole route has a "peanut shell" of the third-party plug-in, overjoyed, I was encouraged to buy the roommate is this polar route, finally did not white buy you, decisive to try a bit, enter the domain name to see, wow unexpectedly pop-up router backstage things eh, seems to react, then ping a bit, Also really have received information, and then go to the next dorm to try, and do not, to kneel Orz, the Internet to find a lot of people have this problem, the local ping has a response, the external network Ping did not respond. The truth to the Peanut Shell forum post for help, found that the peanut shell forum themselves are hanging, so really good, their forum will be hanging, but also how to let people feel at ease to buy your products ah qaq, although I do not know usually this is still my special face black when I go to this time.

Then on the Internet to find Ah, see the article nat123 use the tutorial (in fact, this tutorial is not much use), mentioned another dynamic domain name provider, nat123, did not hold much hope to try the next, and then downloaded the software, by the interface are copied buckle, good ugly, forget the focus is not this. And then find the next tutorial, this goods tutorial aspects on the humanization, nat123 Help-Tutorial Case summary-on-demand finishing-novice must see 20141101 summed up a variety of problems, and in the configuration, the box has a small question mark next to what to fill, and the best is, custom domain name Ah! Peanut shell is to send you a and then will use this domain name Ah! nat123 domain name can be directly used xxx.nat123.net format domain name, XXX can be customized, or with their own domain name! The tutorial is very user-friendly, focused on a variety of issues, I directly saw this very useful tutorial tomcat under the external network release 80 Port Web Project! In short, this has done the domain name problem!

Lou Crooked Many, nonsense said a lot, summed up a sentence is, domain name problem with nat123.

The following is a detailed tutorial

-------------------------------------------------------------

Tomcat installation and the first HelloWorld website

Login http://tomcat.apache.org Download, suggest Tomcat 7.0.X or later, I use the 7.0.56,windows platform download zip,linux download tar, not recommended to download the installation files.

Download and unzip to any place, then the inside is mainly three places

1. conf under the Server.xml, inside the <connector port= "8080" protocal= "http/1.1" connectiontimeout= "20000" redirectport= "8443"/> Red font is the port of Tomcat, often used later, it is recommended not to modify

2. bin storage start and close Tomcat stuff, start Tomcat to run Startup.bat under this directory

3. WebApps Store the Web application, and the programs you do are copied to the file below, and you can use Tomcat to get someone else to access it.

If it goes well, run Startup.bat after you open the URL localhost:8080 (if you change the port for other numbers, change it here) should have Tomcat page display.

And then build the first website.

1. Create a new folder under the WebApps folder, Helloworld

2. Create a new folder under HelloWorld This folder, the name must be Web-inf, pay attention to capitalize

3. Create a new Web. XML under Web-inf (Create a new document text and then modify the suffix to XML) to copy this

 <?  xml version= "1.0" encoding= "GBK"  ?>  <  web-app  xmlns  = "Http://java.sun.com/xml/ns/javaee"   xmlns:xsl  = "Http://www.w3.org/2001/XMLSchema-instance"   Xsi:schemalocation  = "Http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_ 0.xsd "  version  =" 3.0 " >  </ web-app  >  
Web. XML

4. Create a new helloworld.html in the HelloWorld folder, note that the HTML file is opened by default in the browser, but we have not hit the code, so we have to right-click Open mode, select Notepad (do not need to modify the default open mode, HTML or default with a browser open is better), this short three lines of things into the, this is your first site.

< HTML > < Body > Hello World</body></html>

5. Run a look, enter the address in the browser http://localhost:8888/Helloworld/Helloworld.html and then look at your first website (smiling face, although very ugly, but after all, is the first site, or biological).

Then you want to build a complex site, it is necessary to learn HTML, JavaScript and other content, www.w3school.com.cn is a good site

-------------------------------------------------------------

Configuration of the nat123:

1. Download the software to this website http://www.nat123.com/Pages_2_32.jsp

2. Open the software and register an account

3. Login account, the software is a button-like interface, there is an option to add mappings below, yes, hard to poke in

4. Set the content, in fact, there is a connection above the slot has introduced Tomcat under, Nat123 's settings, here again briefly

Application type Select (HTTP) Web site

Map Route Selection nat123

App name, what you like to fill out. It doesn't matter anyway, it just shows up in your software interface.

Intranet port, that is, you just Tomcat set the port, default 8080, if you modify, then fill in the modified

Intranet address localhost

Domain name in accordance with the rules, you fill out a

Confirm Save

5. Wait a few 10 seconds, see the bottom right corner of the avatar more smiley face (buckle in the state selection Q I am the smiling face) is available

-------------------------------------------------------------

After finishing up, your computer is now connected to the world.

Enter the URL to see it

Http://xxxxxx.nat123.net/Helloworld/Helloworld.html (xxxxxx part is your own definition of the name)

Then go to the next dorm to pay someone to see if you can open, by the way to install force.

Finish.

It's so late. Let's go to bed with CF last night.

Tutorial: Build a website with your own computer (nat123 peanut shell Dynamic Domain name PC do server)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.