CN104111995B - A kind of static file management method and system based on Nginx - Google Patents

A kind of static file management method and system based on Nginx Download PDF

Info

Publication number
CN104111995B
CN104111995B CN201410317650.9A CN201410317650A CN104111995B CN 104111995 B CN104111995 B CN 104111995B CN 201410317650 A CN201410317650 A CN 201410317650A CN 104111995 B CN104111995 B CN 104111995B
Authority
CN
China
Prior art keywords
file
nginx
static file
static
nginx servers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410317650.9A
Other languages
Chinese (zh)
Other versions
CN104111995A (en
Inventor
赵兴雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN201410317650.9A priority Critical patent/CN104111995B/en
Publication of CN104111995A publication Critical patent/CN104111995A/en
Application granted granted Critical
Publication of CN104111995B publication Critical patent/CN104111995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a kind of static file management method based on Nginx, following steps are specifically included:Step 1:Nginx servers receive the request of client;Step 2:Judge that the request is static file or service request, if static file, perform step 3;Otherwise, step 4 is performed;Step 3:The static file being stored in Nginx servers is returned to client, is terminated;Step 4:Service request is sent to corresponding business module, business module data according to corresponding to being fed back service request by Nginx servers;Step 5:The data that business module feeds back are sent to client by Nginx servers, are terminated.The present invention can be very good the public static file being managed collectively between each operation system, pattern, control, template of each operation system etc. can be unified well, static system file renewal process is also simplify simultaneously, and the performance that system accesses static file can also be substantially improved.

Description

A kind of static file management method and system based on Nginx
Technical field
The present invention relates to a kind of static file management method and system based on Nginx, belong to communication technical field.
Background technology
At present, telecommunications industry operation system is more and complicated, following problem occurs:
Pattern style disunity:Because system each develops own system style and component, there is very big randomness, lead Cause the disunity of pattern style.
Customer complaint increases:Due to operation system pattern style component disunity, Consumer's Experience is unfriendly, and easily goes out Existing various random defects, cause customer complaint.
Developer's workload increases:This often require that each system have skilled interface development staff development styles, Component.And developed for each system a set of, cause the wasting of resources and the increase of human cost.
Static file renewal workload is big:Static file renewal needs to update multiple systems, and workload is big and easily goes out It is wrong.Cause later stage test job amount also bigger.
Nginx:It is high performance a HTTP and Reverse Proxy, and IMAP/POP3/SMTP agency's clothes Business device.Nginx is developed by the Rambler.ru websites that Igor Sysoev are Russian visit capacity second, first disclosure Version 0.1.0 is published on October 4th, 2004.It issues source code in the form of class BSD licensings, because its stability, The consumption of abundant function collection, sample profile and low system resource and it is well-known.
Static file:Herein refer to the pattern file (CSS files, picture file) of system, interface assembly (template file, JS files).
The content of the invention
The technical problems to be solved by the invention are to provide a kind of pattern style unification for realizing operation system, can simplify Static system file renewal process, and reduce cost of human resources input and carry the high performance static file pipe based on Nginx Reason method.
The technical scheme that the present invention solves above-mentioned technical problem is as follows:A kind of static file management method based on Nginx, Specifically include following steps:
Step 1:Nginx servers receive the request of client;
Step 2:Judge that the request is static file or service request, if static file, perform step 3;It is no Then, step 4 is performed;
Step 3:The static file being stored in Nginx servers is returned to client, is terminated;
Step 4:Service request is sent to corresponding business module by Nginx servers, and business module is according to service request Data corresponding to feedback;
Step 5:The data that business module feeds back are sent to client by Nginx servers, are terminated.
The beneficial effects of the invention are as follows:The present invention can be very good the public static state being managed collectively between each operation system File is (such as:Pattern file, WEB technology components, template file etc.), the pattern, control, mould of each operation system can be unified well Plate etc., while static system file renewal process is also simplify, the performance that system accesses static file can also be substantially improved.
On the basis of above-mentioned technical proposal, the present invention can also do following improvement.
Further, the static file includes pattern file (such as:CSS or picture etc.), WEB technology components (such as:JS or HTML etc.) and template file is (such as:HTML, FTL file or TXT etc.) etc..
Further, in addition to step 0:All business modules are united system style, system component and system template etc. One obtains pattern file after reunification, WEB technology component template files etc., pattern file after reunification, WEB technology component templates File etc. forms static file, and static file is sent to Nginx servers and preserved by all business modules.
The technical scheme that the present invention solves above-mentioned technical problem is as follows:A kind of static file management system based on Nginx, Including Nginx servers and at least one business module;
The Nginx servers receive the request of client;Judge that the request is static file or service request, such as Fruit is static file, returns and is stored in static file in Nginx servers to client;Otherwise, Nginx servers are by business Request is sent to corresponding business module, and the data that business module feeds back are sent into client;
Data corresponding to the service request feedback that the business module is sent according to Nginx servers are to Nginx servers.
The beneficial effects of the invention are as follows:The present invention can be very good the public static state being managed collectively between each operation system File is (such as:Pattern file, WEB technology components, template file etc.), the pattern, control, mould of each operation system can be unified well Plate etc., while static system file renewal process is also simplify, the performance that system accesses static file can also be substantially improved.
On the basis of above-mentioned technical proposal, the present invention can also do following improvement.
Further, the static file includes pattern file (such as:CSS or picture etc.), WEB technology components (such as:JS or HTML etc.) and template file is (such as:HTML, FTL file or TXT etc.) etc..
Further, the business module is uniformly obtained system style, system component and system template etc. after reunification Pattern file, WEB technology component template files etc., pattern file after reunification, WEB technology component template files etc. form it is quiet Static file is sent to Nginx servers and preserved by state file, all business modules.
Brief description of the drawings
Fig. 1 is a kind of static file management method flow chart based on Nginx of the present invention;
Fig. 2 is a kind of static file management system structured flowchart based on Nginx of the present invention.
In accompanying drawing, the list of parts representated by each label is as follows:
1st, Nginx servers, 2, business module.
Embodiment
The principle and feature of the present invention are described below in conjunction with accompanying drawing, the given examples are served only to explain the present invention, and It is non-to be used to limit the scope of the present invention.
As shown in figure 1, for a kind of static file management method based on Nginx of the present invention, specifically include following Step:
Step 0:All business modules are uniformly obtained system style, system component and system template in sample after reunification Formula file, WEB technology component template files, pattern file, WEB technology components template file after reunification form static file, Static file is sent to Nginx servers and preserved by all business modules;
Step 1:Nginx servers receive the request of client;
Step 2:Judge that the request is static file or service request, if static file, perform step 3;It is no Then, step 4 is performed;
Step 3:The static file being stored in Nginx servers is returned to client, is terminated;
Step 4:Service request is sent to corresponding business module by Nginx servers, and business module is according to service request Data corresponding to feedback;
Step 5:The data that business module feeds back are sent to client by Nginx servers, are terminated.
The static file includes pattern file (such as:CSS or picture etc.), WEB technology components (such as:JS or HTML etc.) and Template file is (such as:HTML, FTL file or TXT etc.) etc..
As shown in Fig. 2 be a kind of static file management system based on Nginx of the present invention, including Nginx services Device 1 and at least one business module 2;
The Nginx servers 1 receive the request of client;Judge that the request is static file or service request, If static file, return and be stored in static file in Nginx servers 1 to client;Otherwise, Nginx servers 1 will Service request is sent to corresponding business module 2, and the data that business module 2 feeds back are sent into client;
The business module 2 data according to corresponding to the service request feedback that Nginx servers 1 are sent service to Nginx Device 1.
The static file includes pattern file (such as:CSS or picture etc.), WEB technology components (such as:JS or HTML etc.) and Template file is (such as:HTML, FTL file or TXT etc.) etc..
The business module 2 is uniformly obtained system style, system component and system template etc. pattern after reunification File, WEB technology component template files etc., pattern file after reunification, WEB technology component template files etc. form static text Static file is sent to Nginx servers 1 and preserved by part, all business modules 2.
The present invention provides a kind of static file management method based on Nginx, it is necessary to which operation system is system style, system Component carries out unification, is placed on Nginx and is managed collectively, and the unified management of unified static file is realized according to following steps:
The first step, operation system unify static file, include pattern file, WEB technology components.Static file is given Nginx is managed;
Second step, client initiates request access system resources, if accessing static file, Nginx directly returns to system One static file;
3rd step, if what is accessed is operation system resource, Nginx is then forwarded to the processing of corresponding service system.
When user needs unified interface pattern style, the method can be used.For example, client's pipe of telecommunication service system Reason system, customer evaluation management system, integral management system need to realize the unification of styles style, can unify to interface Pattern, interface assembly carry out unitized overall development, are positioned over Nginx servers, and Nginx servers provide resource access path.Opening When sending out staff development client management system, customer evaluation management system, integral management system, it is possible to accessed by unified path The static file at interface.Later stage system upgrade is safeguarded and the adjustment of pattern style can adjust Nginx servers by unified On static file realize renewal process.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.

Claims (2)

1. a kind of static file management method based on Nginx, it is characterised in that specifically include following steps:
Step 0:After all business modules carry out unitized overall development to system style, system component and system template, obtain after reunification Pattern file, WEB technology components, template file;
Pattern file, WEB technology components, the template file after reunification is formed into static file, all business modules will be quiet State file is sent to Nginx servers and preserved;
Step 1:Nginx servers receive the request of client;
Step 2:Judge that the request is static file or service request, if static file, perform step 3;Otherwise, hold Row step 4;
Step 3:The static file being stored in Nginx servers is returned to client, is terminated;
Step 4:Service request is sent to corresponding business module by Nginx servers, and business module feeds back according to service request Corresponding data;
Step 5:The data that business module feeds back are sent to client by Nginx servers, are terminated.
2. a kind of static file management system based on Nginx, it is characterised in that including Nginx servers and at least one industry Business module;
At least one business module, after carrying out unitized overall development to system style, system component and system template, obtain Pattern file, WEB technology components, template file after reunification;
The pattern file after reunification, WEB technology components, template file are formed into static file, and by the static file Nginx servers are sent to be preserved;
The Nginx servers receive the request of client;Judge that the request is static file or service request, if Static file, return and be stored in static file in Nginx servers to client;Otherwise, Nginx servers are by service request Corresponding business module is sent to, and the data that business module feeds back are sent to client;
Data corresponding to the service request feedback that the business module is sent according to Nginx servers are to Nginx servers.
CN201410317650.9A 2014-07-04 2014-07-04 A kind of static file management method and system based on Nginx Active CN104111995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410317650.9A CN104111995B (en) 2014-07-04 2014-07-04 A kind of static file management method and system based on Nginx

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410317650.9A CN104111995B (en) 2014-07-04 2014-07-04 A kind of static file management method and system based on Nginx

Publications (2)

Publication Number Publication Date
CN104111995A CN104111995A (en) 2014-10-22
CN104111995B true CN104111995B (en) 2018-02-13

Family

ID=51708786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410317650.9A Active CN104111995B (en) 2014-07-04 2014-07-04 A kind of static file management method and system based on Nginx

Country Status (1)

Country Link
CN (1) CN104111995B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590145A (en) * 2016-07-06 2018-01-16 北京神州泰岳软件股份有限公司 A kind for the treatment of method and apparatus of page static resource

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7171443B2 (en) * 2001-04-04 2007-01-30 Prodigy Communications, Lp Method, system, and software for transmission of information
US20140150101A1 (en) * 2012-09-12 2014-05-29 Xecure Lab Co., Ltd. Method for recognizing malicious file
CN103384242B (en) * 2013-03-15 2016-12-28 中标软件有限公司 Intrusion detection method based on Nginx proxy server and system
CN103631869B (en) * 2013-11-05 2018-04-17 北京奇虎科技有限公司 A kind of method and apparatus for alleviating server-side database access pressure

Also Published As

Publication number Publication date
CN104111995A (en) 2014-10-22

Similar Documents

Publication Publication Date Title
US8250215B2 (en) Method and system for intelligently leveraging cloud computing resources
CN105099739B (en) One kind being based on plug-in type software deployment method, apparatus and application server
EP2590113B1 (en) On demand multi-objective network optimization
CN103546343B (en) The network traffics methods of exhibiting of network traffic analysis system and system
US10972564B2 (en) System and method for automating actions in distributed computing
CN110795147A (en) Interface protocol file management method and device
CN113094136A (en) Page display control method and device, storage medium and electronic equipment
JP2016521897A (en) Application upgrade method and apparatus
CN103077024A (en) Device and method for supporting customization and running of software-as-a-service (SaaS) application processes
CN114205230B (en) Configuration method, system, medium and electronic equipment of cloud primary network element
CN103313289A (en) Wap system automatic test system and method
US11765112B2 (en) Context driven dynamic actions embedded in messages
KR102486236B1 (en) Apparatus and method for network function virtualization in wireless communication system
US8843587B2 (en) Retrieving availability information from published calendars
CN104572099A (en) Assembly and middleware based low-coupling frame data processing method and system
CN113778499B (en) Method, apparatus, device and computer readable medium for publishing services
CN104111995B (en) A kind of static file management method and system based on Nginx
CN113556359A (en) Communication protocol conversion method, device, system and gateway device
CN113760278A (en) Page management method and device
CN113127335A (en) System testing method and device
US20170223136A1 (en) Any Web Page Reporting and Capture
CN103051722B (en) A kind ofly determine the method whether page is held as a hostage and relevant device
CN111753226A (en) Page loading method and device
US20220413923A1 (en) Seamless micro-services data source migration with mirroring
US20110320527A1 (en) Method and system for managing a web-domain request

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant