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 Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to build a load balancing server based on Centos7+Nginx+Tomcat8
- After manually installing nginx, everything is normal, and there are no problems with the configuration of the virtual host and load balancing. It was successfully enabled. The specific configuration file is as follows: Added: includevhost/*.conf; to the nginx.conf file of conf to introduce all the .conf files in the vhost directory. In order to make it easy to configure in the future, of course, if necessary, You can also add them one by one. Because the load service is an api service, the name of the conf file here is called api.xxx.com.conf. The configuration of opening the file is as follows: The ip polling method is not used here, but the usstream method is used. Specifically What is the difference between these methods?
- Nginx 1388 2023-05-12 23:16:16
-
- How nginx implements database port forwarding
- For data security reasons, under normal circumstances, external network access is generally prohibited for websites or project databases, or access is only allowed to some hosts. So, how can we allow other hosts that are prohibited from accessing to access this database without modifying such permissions? At this time, the role of Nginx is reflected. 1. For mysql, for example, the database configurations such as oracle and sqlserver are the same as the following configurations, except that the database ports are different. It should be noted that this configuration must be written outside http. #Use nginx for database port forwarding stream{upstreamsql{#Configure the IP of the database. and port server172.16.8.190:3306w
- Nginx 2189 2023-05-12 23:13:04
-
- How to configure Nginx anti-hotlinking
- Experimental environment • A minimally installed centos7.3 virtual machine • Configuration: 1 core/512mb • nginx version 1.12.2 1. Configure hotlink websites 1. Start an nginx virtual machine and configure two websites vim/etc/ nginx/conf.d/vhosts.conf add the following content server{listen80;server_namesite1.test.com;root/var/wwwroot/site1;indexindex.html;location/{}}server{listen80;server_namesite2.test.
- Nginx 2002 2023-05-12 23:04:04
-
- How to use gzip compression in nginx to improve website speed
- Why use gzip compression? Turn on nginx's gzip compression. The size of static resources such as js and css in the web page will be greatly reduced, thereby saving a lot of bandwidth, improving transmission efficiency, and giving users a faster experience. nginx implements gzip The principle of nginx to implement resource compression is to intercept requests through the default integrated ngx_http_gzip_module module, and perform gzip on the types that need to be gzip. It is very simple to use and can be turned on directly, just set the options. . Request headers and response headers after gzip takes effect requestheaders:accept-encoding:gzip,deflate,sdchresponseheaders:
- Nginx 1711 2023-05-12 22:34:10
-
- How to configure Nginx ssl certificate to achieve https secure access
- The prerequisite is that you have a server and your own domain name that can be resolved to the server. 1. Nginx installation and configuration If you have installed Nginx, you need to check whether your Nginx has the SSL module function enabled: ./nginx-V is displayed as above, which means that the SSL function is enabled, otherwise the following error message may appear: nginx:[emerg]the"ssl"parameterrequiresngx_http_ssl_modulein/usr/local/nginx.conf:%Installation steps 1. Download the nginx compressed package from the official website nginx:download Let's go to the official website to download it first
- Nginx 2547 2023-05-12 22:28:04
-
- How to solve linux nginx not parsing php
- Solution to linuxnginx not parsing php: 1. Check whether port 9000 is in listening state; 2. Check the "php-fpm.conf" file; 3. Modify the nginx configuration to "location~\.php${fastcgi_passunix:/dev /shm/php-cgi.sock;#127.0.0.1:9000fastcgi_indexindex..." can be used. Solution to nginx not parsing php file 502: The installed nginx listens to port 9000 by default. Check whether port 9000 is in listening state netstat-antp|grep:9000
- Nginx 1055 2023-05-12 22:19:11
-
- How to deploy your own django project with nginx+uwsgi
- Step 1: Change the source. Enter the command to replace the Ubuntu download source sudonano/etc/apt/sources.list. Replace all the following files with the original files. I am using the Alibaba source here. You can also change to other sources. debhttp://mirrors.aliyun.com/ubuntu/bionicmainrestricteddebhttp://mirrors.aliyun.com/ubuntu/bionic-updatesmainrestricteddebhttp://mirrors.aliyun.com/ubuntu/bionicunive
- Nginx 1519 2023-05-12 22:10:05
-
- How to configure Nginx timeout timeout
- keepalive_timeouthttp has a keepalive mode, which tells the webserver to keep the TCP connection open after processing a request. If it receives other requests from the client, the server will use this unclosed connection without establishing another connection. httpkeep-alive, every request on the web page is http (pictures, css, etc.), and to open an http request, you must first establish a tcp connection. If a page needs to open and close a tcp connection for each request, it will become a resource. The waste of keepalive_timeout is that when an http request is completed, its tcp connection will remain
- Nginx 2691 2023-05-12 22:07:13
-
- How to implement kibana login authentication through Nginx reverse proxy
- Install the ApacheHttpd password generation tool $yuminstallhttpd-tools-y to generate the Kibana authentication password $mkdir-p/usr/local/nginx/conf/passwd$htpasswd-c-b/usr/local/nginx/conf/passwd/kibana.passwdUserrenwolecomGN5SKorJAddingpasswordforuserUserrenwolecom configure Nginx reverse Add the following content to the proxy in the Nginx configuration file (or include it in a new configuration file): $vim/us
- Nginx 1708 2023-05-12 22:01:17
-
- How to implement nginx front-end distribution based on $remote_addr
- The requirements are as follows: There are multiple servers under the domain name. Now we are testing for a certain region. Let IP users in a certain region only access a certain server and do the test separately. If there are no problems, update them all; if there are problems, the impact will be small. Find problems in time and solve them; Solution: Use the nginx module to configure matching rules on the front-end load balancing forwarding machine; nginx configures vhost, in the location section under the domain name, add a piece of code. If $remote_addr matches the ip, forward it to abc_test_server;server{listen80;server_nameabc.com.cn;access_log/dev/
- Nginx 1549 2023-05-12 22:01:12
-
- How to solve the conflict between nginx and backend port
- Problem: When I started the development environment of the Alice management system, I found that all interfaces in the background all generated 404 errors during the first request, but the second request successfully located the problem. I checked the nginx error log and found the following error, so I mistakenly thought The error occurred because the file in the html folder could not be written due to insufficient permissions. So after opening the permissions, I found that it still didn't work. After searching on Google, I still couldn't find a solution. I put it aside for the time being, and when I tried to find the error again the next day, I accidentally opened port 8081. When you accessed localhost:8081 and 127.0.0.1:8081, the contents were actually different. At that time, I realized that there was a port conflict, so I opened the file and found the conf of nginx.
- Nginx 1405 2023-05-12 21:52:18
-
- How to implement Nginx dynamic and static separation configuration
- 1. Overview 1.1 The difference between dynamic pages and static pages Static resources: When users access this resource multiple times, the source code of the resource will never change. Dynamic resources: When a user accesses this resource multiple times, the resource's source code may undergo changes. 1.2 What is dynamic and static separation? Dynamic and static separation allows dynamic web pages in dynamic websites to distinguish constant resources from frequently changing resources according to certain rules. After dynamic and static resources are split, we can separate them according to the characteristics of static resources. It does caching operations, which is the core idea of static website processing. The simple summary of dynamic and static separation is: the separation of dynamic files and static files. Pseudo-static: If the website wants to be searched by search engines, dynamic page static technology such as freemarker and other template engine technologies 1.
- Nginx 2272 2023-05-12 21:25:04
-
- How to install Nginx+PHP under Windows system
- Step 1. Download Nginx. First, you need to download the Nginx installation package from the official website of Nginx. You can visit http://nginx.org/ or click here directly to download the latest version. After downloading, extract it to a local directory, such as D:\nginx. Step 2. Download PHP. Then you need to download the PHP installation package from the official website of PHP. You can visit https://www.php.net/ or click here directly to download the latest version. Select the Windows version of the ZIP package to download. After downloading, extract it to a local directory, such as D:\php. Step 3. Configure Nginx and PHP Next you need to configure Nginx and PHP. Find Ng first
- Nginx 1745 2023-05-12 21:16:19
-
- How to adjust Nginx server for OpenSSL security vulnerability
- 1. Overview Currently, openssl vulnerabilities have been exposed, which will leak private information. There are many machines involved and the environments are very different, resulting in different repair solutions. Many servers use nginx to statically compile openssl and directly compile openssl into nginx. This means that simply upgrading openssl will have no effect. nginx will not load the external openssl dynamic link library. nginx must be Recompiling can cure it. 2. Identify whether nginx is statically compiled. The following three methods can confirm whether nginx is statically compiled openssl. 2.1 Check the nginx compilation parameters. Enter the following command to check the compilation of nginx.
- Nginx 1389 2023-05-12 20:55:04
-
- How does Nginx-rtmp realize the real-time streaming effect of live media?
- 0. Preface During this time, I am building an ipcamera project server. For video point-to-point calls, the client will view the real-time audio and video stream on the device. In order to save traffic, penetration is through p2p. But due to the reasons of NAT equipment and the exhaustion of ipv4. Some devices are unable to transmit live streams point-to-point. So server forwarding is required. Here, in order to quickly implement the prototype, we also refer to the current mainstream streaming media protocols. I found that many use the rtmp protocol. The picture below is the overall design diagram. In order to integrate multiple platforms, we will build our own rtmp streaming media server and use the rtmp streaming media service of cloud vendor saas. However, because sometimes some non-streaming media data is transmitted and some binary files need to be transmitted, it will
- Nginx 1100 2023-05-12 20:43:12