current location:Home > Technical Articles > Operation and Maintenance > Nginx

  • How to deploy tomcat and Nginx on linux server
    How to deploy tomcat and Nginx on linux server
    1. Preparation work: First of all, you must have a Linux server that can be played, and know the user name and password. Then you need to install two tools on the Windows computer that can connect to the Linux server, xshell5 and xftp5. I will not go into the installation tutorial. I will add a picture. Explain how to connect to the server: The xshell connection interface is as follows. After entering the host IP and click OK, xshell will pop up a window to enter the user name and password to connect successfully! The xftp connection interface is as follows. Just fill in the blanks. It’s very simple. I won’t go into details. I’d like to mention why sftp is chosen instead of ftp here. You’ll understand if you know how much you know about the difference between ftp and sftp! 2. Installation and deployment work If you want to deploy the project to
    Nginx 1190 2023-05-13 18:58:11
  • How to configure Nginx cross-domain access and anti-leeching
    How to configure Nginx cross-domain access and anti-leeching
    Cross-domain access control Cross-domain access Why does the browser prohibit cross-domain access? It is unsafe and prone to CSRF attacks! If website B controlled by a hacker adds malicious information in the response header to allow the client to access website A, a csrf attack will occur. How to configure cross-domain access in nginx? Server, location, ifinlocation syntax explanation: add_headernamevalue[always]; name represents the keyvalue returned by the response header and represents the response header returned.
    Nginx 1833 2023-05-13 18:31:12
  • What is the method for smooth upgrade of Nginx production environment?
    What is the method for smooth upgrade of Nginx production environment?
    1. Background Recently I encountered a rather embarrassing and practical problem, that is, the Nginx used in our production environment is an old antique of Centos6. Business requirements need to be implemented by loading a module of Nginx, but the version is too old and needs Nginx1.18 or later to support it, and ours is Nginx1.12. Then upgrading Nginx is what we have to do. But in the production environment, you have to consider many things. Unlike the test server, Nginx stops the service, recompiles the new version, and then starts it again. Our online services need to be provided uninterrupted, otherwise it will cause economic losses to the business. So is there any plan to smoothly upgrade the Nginx version? 2. Upgrade plan In fact, the official has long been aiming at smooth upgrade of Nginx.
    Nginx 1670 2023-05-13 17:58:06
  • How to install nginx offline on Linux
    How to install nginx offline on Linux
    \1. First install the dependent library yuminstall-ygcc-c++``yuminstall-ypcrepcre-devel``yuminstall-yzlibzlib-devel``yuminstall-yopensslopenssl-devel\2. Download the nginx installation package http://nginx.org/download/ \3. Upload the downloaded nignx source code package to the Linux server and decompress it\4. Enter the decompressed root directory of nginx and configure cdnginx-1.9.9./configure--prefix=/usr/local
    Nginx 5965 2023-05-13 17:55:19
  • How to compile and install PHP and Nginx in Ubuntu environment
    How to compile and install PHP and Nginx in Ubuntu environment
    Compile and install nginx, change directory to the working folder: cd/usr/local/src, download pcre source code and install wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.20.tar .gztar-zxvfpcre2-10.20.tar.gzmv./pcre2-10.20.tar.gz./pcrecdpcre./configure--prefix=/usr/local/pcremake&&makeinstall download zlib
    Nginx 1335 2023-05-13 17:49:14
  • How to configure Nginx server for Node.js program
    How to configure Nginx server for Node.js program
    Node.js is a platform built on the Chrome JavaScript runtime, which is used to easily build web applications with fast response speed and easy expansion. Node.js uses an event-driven, non-blocking I/O model to be lightweight and efficient. It is very suitable for data-intensive real-time applications running on distributed devices, such as real-time chat and so on. However, gzip encoding, static files, http caching, SSL processing, load balancing and reverse proxy, etc., can all be completed through nginx, thereby reducing the load on node.js and saving website traffic through nginx's powerful cache. Improve website loading speed. The flow chart nginx configuration is as follows: http{proxy_
    Nginx 1239 2023-05-13 17:25:06
  • How to install and configure Docker nginx mounting
    How to install and configure Docker nginx mounting
    Download the nginx image in docker dockerpullnginxdockerimages Create the mounting directory mkdir-p/data/nginx/{conf, conf.d, html, logs} Write the nginx, conf configuration file and place it in the folder #formoreinformationonconfiguration, see: #*officialenglishdocumentation :http://nginx.org/en/docs/#*officialrussiandocumentation:http://ng
    Nginx 1306 2023-05-13 17:16:13
  • How to obtain the user's real IP address based on nginx reverse proxy
    How to obtain the user's real IP address based on nginx reverse proxy
    Introduction When nginx is used as a reverse proxy, the IP address obtained by the default configuration backend comes from nginx. Use request.getRemoteAddr(); to obtain the IP address of nginx, not the user's real IP. 1. Modify Nginx Configuration: server{listen80;server_namejenkins.local.com;location/{proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_passhttp://192.168.10.
    Nginx 4487 2023-05-13 17:07:12
  • How to solve nginx 503 Service Temporarily Unavailable error
    How to solve nginx 503 Service Temporarily Unavailable error
    Recently, the 503servicetemporarilyunavailable error often appears after the website is refreshed. Sometimes it is possible. I think of the recent restriction on the number of single IP accesses in nginx.conf, (limit_req_zone$binary_remote_addrzone=allips:20mrate=20r/s;) and enlarge this number before refreshing. Problems found and solved. (I also changed this to a larger limit_reqzone=allipsburst=50nodelay;) In order to confirm the problem, I repeatedly changed the number and tested it and found that the problem is indeed here. There is a problem if this number is set too small. Pass fid
    Nginx 7106 2023-05-13 16:22:06
  • What are the nginx-naxsi whitelist rules?
    What are the nginx-naxsi whitelist rules?
    Whitelist rule syntax: basicrulewl:id[negative][mz:[$url:target_url]|[match_zone]|[$args_var:varname]|[$body_vars:varname]|[$headers_var:varname]|[name]] wl:id (whitelistid) Which interception rules will enter the whitelist wl: 0 Add all interception rules to the whitelist wl: 42 Add the interception rule with id 42 to the whitelist wl: 42, 41, 43 Add ids 42, 41 and Add the interception rule 43 to the whitelist wl:-42 add all interception rules
    Nginx 1277 2023-05-13 16:19:14
  • How to use geoip for regional restrictions in nginx
    How to use geoip for regional restrictions in nginx
    Environment: nginxversion:nginx/1.14.0centosversion:centos7 The requirements are as follows: distinguish domestic or foreign countries through IP, so as to jump to different pages, and finally use nginx’s third-party module: geoip to achieve this, let alone its advantages. There are many explanations on the Internet. Let’s see how to configure it. My system is configured with nignx.repo. I directly used yum to install the geoip module. There is no need to add the module and reprogram it. yuminstallnginx-module-geoip downloads the geoip database file cd/ etc/nginxmkdirgeoipdatcdg
    Nginx 1673 2023-05-13 16:07:06
  • How to use Nginx to proxy multiple application sites in Docker
    How to use Nginx to proxy multiple application sites in Docker
    How to proxy (how do containers communicate)? Just use the proxy function of nginx directly (see related capabilities separately). The troublesome thing here is the communication between docker containers. There are four main methods of communication between docker containers: -Access through container IP: After the container is restarted, the IP will change. -Access through the host's ip:port method: If the host's IP changes, each application must be changed and the port must be bound, which is troublesome. - Establishing links through links: interdependence is too tight and is not conducive to maintenance. - Custom network: Containers in the same bridge network can access each other. Obviously, we will choose to customize the network so that related applications can link to the same
    Nginx 2263 2023-05-13 15:55:17
  • How to implement Nginx operation response header information
    How to implement Nginx operation response header information
    Prerequisite: The ngx_http_headers_module module needs to be compiled to support header information operations. add_header means adding custom header information to the response header. The instruction is add_headernamevalue[always];, which can be used in http{}, server{}, location {}, ifinlocation{} context, only takes effect when the response status code is equal to 200, 201 (1.3.10), 204, 206, 301, 302, 303, 304, 307 (1.1.16, 1.0.13), or 308 (1.13.0), if alw
    Nginx 2196 2023-05-13 15:31:19
  • How to deploy a react project in nginx
    How to deploy a react project in nginx
    Test item react-demo Clone your react-demo project to the server (by default, Github is used to manage our projects) If necessary, please install the project environment such as node.js, yarn, etc. Enter the project directory, execute npm to run the build, and start building the project. After a successful build, a dist folder will be generated (depending on your project configuration), and the static files in this folder will become the access files of our project. To configure Nginx, Linux server enter: /etc/nginx/sites-enabled, then as administrator, create a new configuration file for your react project such as react-demo.conf
    Nginx 2205 2023-05-13 15:28:23
  • How to configure Nginx reverse proxy using SSL
    How to configure Nginx reverse proxy using SSL
    Prerequisites 1. Backend Server: For the purpose of this tutorial, we are using tomcat server running on localhost on port 8080 Note: - When you start proxying requests, make sure that the application server is started. 2. SSL certificate: We also need to configure the SSL certificate on the server. We can use let'sencrypt's encryption certificate, you can get one using the program mentioned here. But for this tutorial, we will use a self-signed certificate, which can be created by running the following command from the terminal, $opensslreq-x509-nodes-days365-newkeyrsa:2048-keyout/etc
    Nginx 1646 2023-05-13 15:19:15

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28