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 nginx static resource server
- Enter the conf directory of the nginx installation directory, modify the nginx.conf file, and add a location part of the configuration code in a server{} as follows: root@ubuntu:/usr/local/nginx/conf#vinginx.confserver{listen80;server_namelocalhost;location /{roothtml;indexindex.htmlindex.htm;}location/image/{root/usr/local/myimage/;autoindexon;}} from
- Nginx 2200 2023-05-19 10:13:05
-
- How to use Keepalived+Nginx+Tomcat to implement high-availability web cluster
- keepalived+nginx+tomcat implements high-availability web cluster 1. nginx installation process 1. Download the nginx installation package and install the dependent environment package (1) Install the c++ compilation environment yum-yinstallgcc#c++ (2) Install pcreyum-yinstallpcre-devel (3 )Install zlibyum-yinstallzlib-devel(4) Install nginx, locate the nginx decompression file location, and execute the compile and installation command [root@localhostnginx-1.12.2]#pwd/usr/local/nginx/nginx-1.12
- Nginx 1260 2023-05-19 10:01:05
-
- How to configure nginx load balancing
- Polling nginx distributes all requests evenly to each server in the cluster. upstreamtest{server127.0.0.1:7001;#Equivalent to server127.0.0.1:7001weight=1;server150.109.118.85:7001;#Equivalent to server150.109.118.85:7001weight=1;}server{listen8081;server_namelocalhost ;location/{proxy_passhttp://test/;}}upstream: Define a service cluster
- Nginx 4402 2023-05-19 09:59:21
-
- What is the method to start and stop nginx in Linux system
- Startup code format: nginx installation directory address-cnginx configuration file address For example: [root@LinuxServersbin]#/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf Stop nginx There are three ways: stop calmly 1. Check the process number [root@LinuxServer~]#ps-ef|grepnginx 2. Kill the process [root@LinuxServer~]#kill-QUIT2072 Stop quickly 1. Check the process number [root@LinuxSer
- Nginx 5501 2023-05-19 09:34:05
-
- How does NGINX count the PV, UV, and independent IP of the website?
- Concept: uv (uniquevisitor): unique visitor, each independent Internet computer (based on cookies) is regarded as a visitor, and the number of visitors who visit your website within a day (00:00-24:00). Visits to the same cookie within a day are only counted once PV (pageview): visits, that is, page views or clicks, each visit to the website by the user is recorded once. When a user visits the same page multiple times, the total number of visits is counted. Independent IP: The same IP address is only counted once within 00:00-24:00. Friends who do website optimization are most concerned about this. Let me first state the environment. This run nginx version 1.7, the backend tomcat runs dynamic
- Nginx 2649 2023-05-19 09:13:14
-
- How to set nginx upload directory without execution permission
- Copy the code as follows: orderallow, denydenyfromall and the one on the Internet that does not have execution permissions for the nginx upload directory. Copy the code as follows: location~^/upload/.*\.(php|php5)${denyall;} These configurations look like There is no problem, indeed it can be said under Windows. But *nux is different. Everyone knows that the *nux operating system is case-sensitive. If you change it to an uppercase suffix such as *.php, it will be bypassed. Here I will tell you my personal solution: copy the code. The following://? is a string that matches as many .php as possible, i is not
- Nginx 1202 2023-05-19 08:55:05
-
- How to configure and use the index directory under Nginx server
- nginx configuration location~^/2589(/.*){autoindexon;//Turn on autoindex_localtimeon;//Turn on the display function}auto_index command syntax: autoindexon|off; Configuration section: autoindexoff; Configuration section: http, server, location enabled/only Use nginx directory indexing function. Syntax: autoindex_exact_sizeon|off; configuration section: autoindex_exact_sizeon; configuration section: http, server, location to determine whether
- Nginx 2042 2023-05-19 08:43:05
-
- How to configure TCP load balancing in Nginx
- Assuming that the Kubernetes cluster has been configured, we will create a virtual machine for Nginx based on CentOS. The following are the details of the settings in the experiment: Nginx (CenOS8Minimal)–192.168.1.50KubeMaster–192.168.1.40KubeWorker1–192.168.1.41KubeWorker2–192.168.1.42 Step 1) Install the epel repository because the nginx software package is not in the CentOS system default repository. So you need to install e
- Nginx 1390 2023-05-19 08:29:28
-
- How nginx uses the nginx-rtmp-module module to implement the live broadcast room function
- System environment wujianjun@wujianjun-work~$uname-alinuxwujianjun-work4.10.0-37-generic#41~16.04.1-ubuntusmpfrioct622:42:59utc2017x86_64x86_64x86_64gnu/linux software environment obs(openbroadcastersoftware)v20.0.1(linux)nginx version:nginx/ 1.13.6builtbygcc5.4.020160609(ubuntu5.4.0-
- Nginx 1557 2023-05-19 08:13:05
-
- What is the deployment method of Nginx and PHP
- Introduction to the 2 deployment methods. The first one uses an nginx server in front to do http reverse proxy and load balancing, and nginx on the back n server to do web services, and calls the fastcgi service provided by php-fpm. This deployment method is the most common, web service Both the php service and the php service are deployed on the same server. The second one is an nginx server in the front for web services. The back server only deploys the php-fpm service, which is used by the nginx server to call the front nginx server. After calling multiple php- When fpm serves, load balancing can also be achieved as shown below: Comparatively, from the perspective of system design, the first deployment is the conventional deployment method, which is applicable to large, medium and small-scale websites. The second type, different service departments
- Nginx 1252 2023-05-18 23:43:23
-
- How to use nginx as a load balancer for mysql
- Note: The nginx version requirement is 1.9 or above. When compiling nginx, you need to add --with-stream, such as: ./configure--prefix=/data/apps/nginx--with-http_stub_status_module--with-http_ssl_module--with- http_realip_module--with-http_image_filter_module--with-stream Note 1. Because mysql uses port 3306 by default, when configuring nginxtcp reverse proxy mysql
- Nginx 1257 2023-05-18 22:37:10
-
- How nginx automatically generates configuration files in docker containers
- The final command to implement the idea is probably like this: dockerrun-d-p80:80-exxx=xx Image name Script path in the image The script here will replace the cmd command in the dockerfile, so we need to build a shell that automatically generates and starts nginx script. #!/bin/bash#Get the beginning of lt from the environment variable, in order to distinguish it from other environment variables, for example, lt_analysis=172.17.0.1:8083result=""forain$(env|grep^lt)doold_ifs="$ifs"ifs =&qu
- Nginx 1137 2023-05-18 22:37:04
-
- What are the common functions of Nginx?
- Commonly used functions of nginx 1. http proxy, reverse proxy: As one of the most commonly used functions of web servers, especially reverse proxy. Here I will give you two pictures to explain the positive agent and the reactive agent. You can read the information for the specific details. When nginx is used as a reverse proxy, it provides stable performance and can provide forwarding functions with flexible configuration. nginx can adopt different forwarding strategies based on different regular matching, such as going to the file server at the end of the image file, and going to the web server for dynamic pages. As long as you have no problem writing regular rules and have corresponding server solutions, you can do whatever you want. of play. And nginx performs error page jump, exception judgment, etc. on the returned results. If the distributed server stores
- Nginx 3481 2023-05-18 22:31:17
-
- How to troubleshoot the problem of global reverse proxy already existing in Nginx file
- Project scenario: The Pagoda Linux panel built by Alibaba Cloud has already been built on other websites. I now add a reverse proxy port to a new website. However, when adding the reverse proxy through the Pagoda panel, the following pseudo-image appears. Static error. Problem Description Pseudo-static/nxinx main configuration/vhost/ file already exists a global reverse proxy. This problem actually tells us that a website in the nginx configuration file can only contain one location/, otherwise an error will be reported. Cause analysis: The problem is very clear, that is, there is a problem with the relevant configuration of nginx.conf. The first step is to check the relevant configuration files of the website. Click the website directly to enter the details to view the configuration files. se
- Nginx 4740 2023-05-18 21:13:19
-
- What is the method to compile and install Nginx from source code?
- Nginx is a lightweight web server/reverse proxy server and email proxy server released under a BSD-like license. Developed by Russian programmer lgorSysoev, it is used by Rambler, a large Russian portal and search engine. Its characteristics are that it occupies less memory and has strong concurrency capabilities. In fact, nginx's concurrency capabilities do perform better among web servers of the same type. Detailed description of nginx source code compilation parameters--prefix=points to the installation directory--sbin-path points to (execution) program file (nginx)--conf-path=points to the configuration file (nginx.conf)--error-log-
- Nginx 1028 2023-05-18 19:58:29