Home > other >  OPENWRT router is not connected to the Internet to realize the local APP download
OPENWRT router is not connected to the Internet to realize the local APP download

Time:10-11

In this article to share with a OPENWRT router is not connected to the Internet users to download under the condition of the local APP, purpose is to let a guest on my router (not connected to the Internet), then the router to a web page, click on the link to download the APP in the web page, the following is a simple operation steps (graphic) :

Advance preparation:
Hardware:
1. A OpenWrt router (I am using the day after tomorrow network VOPWRT)
2. A computer
Software:
1. Dreamweaver8 (used for web page creation, also can be made from TXT text)
2. The WinSCP (for file transfer between computers and routers)

a, do a simple web page "hello world!"
1. Open the Dreamweaver8, file - & gt; New - & gt; The basic page - & gt; HTML - & gt; Create, edit box below:

Note: the default will be a basic format content, only need to modify the contents of want to add

2. Edit a simple web page code


3. Save, select "file - & gt; Save as ", the new folder, select a directory as follows:


4. Change the file name to the index. HTML, and click save,
5. Remember the path to the file:

Open the file to see the web page you created earlier: (I am using firefox, so shows firefox logo), a simple hello world web page creation is completed, open look at the effect:


2, into web APP installation package download address
1. Download a simple test APP install package, put in and page file index. The HTML under the same path, can build a downloads, such as


Then put APP install package downloads below (click browse pictures, etc. If want to test the effect, still can put in together next images, such as


2. Once again, open the web page index just now with dreamweaver. HTML, will the two files download path with the code editor, as follows:

Note: about how to code this path, is likely to be consulting professionals ^ - ^

3. Now let's look at the web page open effect:


3, send page file index. The HTML and download the file to the specified directory OpenWrt router (in my VOPWRT example)
1. VOPWRT configuration instructions note:
The machine HTTP service software is Nginx, boot after service software automatically start; Nginx configuration file:/etc/Nginx/Nginx. Conf

This machine is HTTP server supports PHP script;

The default service port for 80, the default native domain name is: the vonets. CFG, also can use the LAN port IP access;

The default HTTP service home page file called: index. HTM, index.html

The root directory of the HTTP service is:/data/WWW directory (/data points to the T - Flash CARDS)

The HTTP service web page file can use WinSCP SSH login software sent to the relevant directory

2. Will first VOPWRT connected to a computer through the LAN port, the computer access to the router IP address is 192.168.252.254


3. Open the tools WinSCP, login equipment:


4. Click the Login:

Note: on the left is a computer file, above the background on the right is the router

5. At this time. Then you will find it on the left side of the computer files, directly drive to the right root directory (on the TF card catalog)



4, enable redirected to native HTTP service (I am using VOPWRT example)
VOPWRT should pay attention to start the machine service:
The router configuration page login address: 192.168.252.254:81 or vonets. CFG: 81
Fill in Redir - URL (a redirect page address) for the unit's IP or native domain;
Don't fill in the Advert Server Addr item; The diagram below:


1. Log on to the router configuration page


2. Select system - & gt;

3. The redirection address:

4. The boot device, all steps to complete,

5, the acceptance results
1. Open the phone connection router hot
2. Hot after a successful connection, mobile phone automatically pop up a web page:


Above this way the router is not outside the network, two night, thinking about a pretty simple,
This APP install package also can at any time into the background to update, web page file also can change at any time,
  • Related