current location:Home > Technical Articles > Operation and Maintenance > Nginx
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- 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
- 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?
- 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
- \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
- 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
- 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
- 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
- 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
- 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?
- 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
- 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 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
- 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
- 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
- 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