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 configure multiple front-end projects in nginx
- Recently, a server needs to be configured with multiple front-end projects. Of course, nginx is required to separate the front-end and back-end projects. A single project is okay, modify the nginx.conf configuration file of nginx as follows #usernobody;worker_processes1;#error_loglogs/error.log;#error_loglogs/error.lognotice;#error_loglogs/error.loginfo;pid/usr/local/nginx/logs/ nginx.pid;events{worker_connections1024;}
- Nginx 2844 2023-05-21 10:34:20
-
- How to configure Nginx anti-leeching
- For service performance considerations, we usually store HTML static resources on multiple services according to different types. If the topology diagram: the referer function in the hypertext transfer protocol referer: null means that the requester directly accesses referer: blocked, usually the referer added by the firewall device: url means that the host in the url tells the requester about the indirect access to jpg.good.com in the diagram It is obviously a server dedicated to users to store pictures, and www.good.com is a web server. It can be seen from the domain name that it must be a company. Conditions: 1. Only users who visit www.good.com are allowed to link to Identity access jpg.go
- Nginx 1120 2023-05-21 10:04:11
-
- How to implement nginx authentication
- Install httpdyuminstall and use htpasswd to produce the password file htpasswd-c/usr/local/nginx/conf/htpasswdaming#-c means creating the file, aming is the user name#When adding a user, you need to remove the -c parameter#How to modify the password and add users Configure nginx user authentication in the same way location/admin/{auth_basic"Auth";auth_basic_user_file/usr/local/nginx/conf/htpasswd;}
- Nginx 1559 2023-05-21 10:04:05
-
- What is the process of Nginx dynamic domain name resolution?
- Summary When Nginx performs reverse proxy, it will perform domain name resolution, resolve the domain name to a specific IP and cache it locally. If the IP corresponding to the domain name changes, it will cause the Nginx proxy to fail. The Nginx resolver directive is used below to implement domain name dynamics. parse. Dynamically resolve the intranet DNS server based on a custom DNS server. I use dnsmasqdefault.conf to configure server{listen80;root/usr/share/nginx/html/;resolver192.168.137.110valid=5s;set$proxy_urlhuzhihui.loca
- Nginx 2273 2023-05-21 09:34:05
-
- How to use Docker to build an Nginx+PHP+MySQL environment and deploy WordPress
- Preparation: Use Alibaba Cloud kelude to create a project, such as a dockerfile. After that, we place all related dockerfile and configuration files of the wordpress environment into the centosbz directory. Use Alibaba Cloud Image Warehouse Alibaba Cloud Docker Image Warehouse address is, which is used to store docker images. You can push the image locally, or you can pull the dockerfile from kelude to automatically build the image. We log in first, and then create a new namespace, such as centos-bz. After that, all nginx, php, and mysql images will be stored in this namespace. Install docker-co
- Nginx 1968 2023-05-21 09:19:11
-
- How to solve the problem of nginx hidden version number and WEB server information
- nginx can not only hide version information, but also supports custom web server information. Let’s take a look at the final hidden result. How to achieve it? It’s actually very simple. Please look down 1. Official website to download the latest stable version wgethttp://nginx.org/ download/nginx-1.14.1.tar.gz2 Unzip tar-xfnginx-1.14.1.tar.gzcdnginx-1.14.13 Modify the c file (1) vimsrc/http/ngx_http_header_filter_module.c #Modify line 49 staticu_charngx_http_
- Nginx 1824 2023-05-21 09:13:05
-
- How to install Nginx using YUM under CentOS7 system
- Introduction nginx was developed by igorsysoev for Russia's second most visited rambler.ru site. The first public version 0.1.0 was released on October 4, 2004. It releases its source code under a BSD-like license and is known for its stability, rich feature set, sample configuration files, and low system resource consumption. The steps in the centos7 conditional tutorial require root user privileges. 1. Add nginx to the yum source. Add the centos7nginxyum resource library, open the terminal, and use the following command: sudorpm-uvhhttp://nginx.org/packages/centos/7/noarch/r
- Nginx 1640 2023-05-21 08:40:06
-
- How to configure and optimize FastCGI in Nginx
- fastcgi: fastcgi is developed and improved from cgi. The main disadvantage of the traditional cgi interface method is poor performance, because every time the http server encounters a dynamic program, the script parser needs to be restarted to perform parsing, and then the results are returned to the http server. This is almost unavailable when dealing with high concurrent access. In addition, the traditional cgi interface method has poor security and is rarely used now. The fastcgi interface mode adopts the c/s structure, which can separate the http server and the script parsing server, and start one or more script parsing daemons on the script parsing server. Every time the http server encounters a dynamic program, it can be delivered directly to fastcg
- Nginx 2930 2023-05-21 08:16:27
-
- How to solve nginx+php-fpm service HTTP status code 502
- For one of our web projects, due to the increase in new cities, the number of visits has increased and the pressure on the db has increased. As a business party that provides interfaces, a large number of "502" requests have been reported recently by downstream feedback. 502, badgateway, is usually an error in upstream (here is PHP). For PHP, the common cause of 502 is that the script execution exceeds the timeout setting time, or the timeout setting is too large, resulting in the PHP process not being released for a long time, and there are no idle workers. process to pick up guests. Our project is caused by the PHP execution time setting being too short. In this case, you can first increase the PHP execution time appropriately and ensure that 502 is cleared first. Optimization will cost more after all.
- Nginx 1335 2023-05-21 08:07:05
-
- nginx load balancing instance analysis
- Note on load balancing of nginx. As you can see, since our website is in the early stages of development, nginx only acts as an agent for one back-end server. However, as our website’s reputation has grown and more and more people are visiting, one server cannot handle it. , so we added multiple servers. How do we configure proxies for so many servers? Here we take two servers as an example to demonstrate for everyone. 1. Upstream load balancing module description case: The following sets the load balancing server list. upstreamtest.net{ip_hash;server192.168.10.13:80;server192.168.10.14:80down;server192.1
- Nginx 1197 2023-05-21 08:01:32
-
- How to customize PHP's $_SERVER variable in nginx
- 1. First, add the variable values you want to add in the nginx configuration. The file content is as follows: location~\.php${try_files$uri=404;root/data/www.shuchengxian.com/;fastcgi_pass127.0.0.1 :9000;fastcgi_indexindex.php;fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;fastcgi_paramENVIRONMENT'DEV&a
- Nginx 1492 2023-05-20 23:52:04
-
- How to set up a high-performance WEB server with Linux+Nginx+Php
- nginx ("enginex") is a high-performance http and reverse proxy server, as well as an imap/pop3/smtp proxy server. nginx was developed by igorsysoev for Russia's second most visited rambler.ru site, where it has been running for more than two and a half years. igor releases the source code under a BSD-like license. Although still in beta, nginx is already known for its stability, rich feature set, sample configuration files, and low system resource consumption. Installation step 1. Compile and install the support library tarzxvflibiconv-1.13.t required for php5.2.9
- Nginx 1269 2023-05-20 23:19:55
-
- How to use nginx and docker to implement a simple load balancing
- Test steps: 1. Build an nginx server in the server and start it. 2. Pull the official image of nginx from the source in docker, dockerpullnginx, and keep it for later use. 3. Create two new folders in the local directory. I created them here. /mydata/test1, /mydata/test2/4. Create new index.html in the two test folders to mark them. Output thisisnginx1 in the first html, and output thisisnginx2 in the second html. 5. Run through docker Containers of two nginx servers and map the static directories to the directories we just created
- Nginx 957 2023-05-20 22:01:04
-
- How to set up nginx+php server application under Linux system
- It is similar to installing other software. The installation process is basically a fool-proof installation of nginx. Execute the following command and it will be completed quickly sudoapt-getinstallnginx. The default installation location of the configuration file: conf:/etc/nginx/nginx.confbin:/usr/sbin/ nginxvhost:/etc/nginx/sites-enable/defaultcgi-params:/etc/nginx/fastcgi-params Install the php-cgi module sudoapt-getinstallphp5-cgi The default installation location of the configuration file
- Nginx 1248 2023-05-20 19:55:04
-
- How Nginx reverse proxy implements session persistence
- 1. ip_hash: ip_hash uses the source address hash algorithm to always send requests from the same client to the same back-end server unless the server is unavailable. ip_hash syntax: upstreambackend{ip_hash;serverbackend1.example.com;serverbackend2.example.com;serverbackend3.example.comdown;serverbackend4.example.com;}ip_hash is simple and easy to use, but has the following problems: when the backend server goes down, session will be lost; from the same
- Nginx 1703 2023-05-20 19:25:20