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 multiple locations
- Preface Configuring multiple locations under nginxserver performs different processing according to different path matching. Commonly used regular expression syntax rules for nginx: The beginning of location[=|~|~*|^~]/uri/{…}= means: exact match. Starting with ^~ means: it is case-sensitive and starts with something. Starting with ~ means: case-sensitive regular matching. Starting with ~* means: case-insensitive regular matching. !~ and !~* respectively represent: case-sensitive non-matching and case-insensitive non-matching regular matching. / means: universal matching, any request will be matched. In the case of multiple location configurations, the matching order is (not verified): match = first, then
- Nginx 2601 2023-05-17 22:25:45
-
- What is the command to install Nginx in Linux?
- 1. Install nginx, which depends on yum-yinstallgcczlibzlib-develpcre-developensslopenssl-devel2.wget download nginx. Download nginx in the newly created nginx folder. The version can be selected on the Nginx official website. I chose the latest and most stable version on the official website at the current point in time wgethttp:/ /nginx.org/download/nginx-1.22.0.tar.gz3. Decompress tar-zxvfnginx-1.22.0.tar.gz4. Automatic configuration #Enter the decompressed nginx directory cdnginx-1.22
- Nginx 1297 2023-05-17 21:58:04
-
- How to check whether nginx is started in Linux system
- The first method: View the process list and filter Each application running in Linux will generate a process, then we can determine whether the Nginx process is started by checking whether it exists. Use ps-ef to list the processes and then filter through grep. For example: ps-ef|grepnginx can see whether the Nginx process exists. The second method: directly check the process idps-Cnginx-opid. This method of directly returning the pid is more suitable for use in conjunction with other programs. For example, execute this command in a shell/python script to get the pid, and then determine whether Nginx is based on the pid. start up. This method is recommended. The third method: use nets
- Nginx 8497 2023-05-17 21:49:10
-
- How to configure Nginx to list directories and files and control access permissions with passwords
- Use nginx to list directories Preparation - install nginx and create some directories and files: Copy the code as follows: $sudoapt-getinstallnginx$cd/usr/share/nginx$mkdirweb$sudomkdirdirectory{1,2,3}$sudotouchfile{1, 2,3}$lsdirectory1directory2directory3file1file2file3nginx configuration: Copy the code code as follows: $sudovim/etc/nginx/conf.d/list.confserver{l
- Nginx 1558 2023-05-17 21:49:04
-
- Nginx basic knowledge introduction example analysis
- nginx is a high-performance http and reverse proxy server known for its high stability, rich feature set, sample configuration files, and low system resource consumption. nginx features handle static files, index files and automatic indexing; open file descriptor buffering. Cacheless reverse proxy acceleration, simple load balancing and fault tolerance. fastcgi, simple load balancing and fault tolerance. Modular structure. Including filters such as gzipping, byteranges, chunkedresponses, and ssi-filter. If multiple SSIs present in a single page are processed by fastcgi or other proxy servers, this processing can run in parallel without waiting for each other.
- Nginx 1461 2023-05-17 21:48:23
-
- How to configure Nginx to support websocket
- 1. Understanding of wss and nginx proxy wss: 1. The wss protocol is actually websocket+SSL, which means adding an SSL layer to the websocket protocol, similar to https (http+SSL). 2. Use nginx to proxy wss [Communication principle and process] The client initiates a wss connection and connects to nginx. Nginx converts the wss protocol data into ws protocol data and forwards it to the websocket protocol port of Workerman. After receiving the data, Workerman does business logic processing and Workerman gives it to the customer. When the client sends a message, the process is the opposite. The data is converted into wss protocol through nginx/ and then sent to the client. 2.
- Nginx 5464 2023-05-17 21:28:13
-
- How to ban access to php in nginx
- How to prohibit nginx from accessing php: 1. Configure nginx to prohibit parsing the specified program in the specified directory; 2. Change "location~^/images/.*\.(php|php5|sh|pl|py)${denyall. ..}" statement can be placed in the server tag. nginx site directory and file URL access control 1. Restrict program and file access based on extensions. Use nginx configuration to prohibit access to PHP, Shell, Perl, and Python program files in the uploaded resource directory. Configure nginx to prohibit parsing the specified program in the specified directory. location~^/images/.*\.(php|p
- Nginx 1202 2023-05-17 21:19:04
-
- How to reverse proxy Nginx to Tomcat server
- In actual production, tomcat servers are generally not used alone in projects. Nginx performs better in responding to static resources. In addition, since nginx is a server specifically used for reverse proxy, it is easy to forward Java requests to the backend. The client is handed over to the tomcat container for processing, and it is used to process static resources. In nginx, a server{} block is often used to configure a relatively large project. Generally, it is all the configurations of a domain name. There are usually multiple configurations in a server block. location to define multiple request rules, such as domain name and root directory configuration, static resource support, phpfastcgi request, url rewriting, error page configuration and other configurations, so
- Nginx 1495 2023-05-17 21:01:04
-
- How to configure a Python web project using Nginx and uWSGI
- Common deployment methods for web projects based on python are: fcgi: Use spawn-fcgi or the tools that come with the framework to generate listening processes for each project, and then interact with the http service. wsgi: Use the mod_wsgi module of the http service to run each project. But there is also uwsgi, which neither uses the wsgi protocol nor the fcgi protocol. Instead, it creates its own uwsgi protocol. According to the author, this protocol is about 10 times as fast as the fcgi protocol. The main features of uwsgi are as follows: Ultra-fast performance. Low memory usage (measured to be about half of mod_wsgi of apache2). Multi-app management. Detailed log
- Nginx 1680 2023-05-17 20:52:04
-
- How to solve nginx panic group problem
- 1. Solution When each worker process is created, it will call the ngx_worker_process_init() method to initialize the current worker process. There is a very important step in this process, that is, each worker process will call the epoll_create() method to create a unique process for itself. Some epoll handles. For each port that needs to be monitored, there is a file descriptor corresponding to it, and the worker process only adds the file descriptor to the epoll handle of the current process through the epoll_ctl() method and listens to the accept event. Triggered by the client's connection establishment event to handle the event. from
- Nginx 1621 2023-05-17 20:49:14
-
- How to implement Nginx request restriction and access control
- 1. Nginx request restrictions 1. HTTP protocol connection and request http protocol version and connection relationship http protocol version connection relationship http1.0tcp cannot reuse http1.1 sequential tcp multiplexing http2.0 multiplexing tcp multiplexing http The request is based on a tcp connection. A tcp connection can generate at least one http request. After http1.1 version, multiple http requests can be sent by establishing a tcp connection. 1. Connection frequency limit syntax syntax:limit_conn_zonekeyzone=name:size;default:—context:httpsyntax
- Nginx 1894 2023-05-17 20:37:04
-
- How to monitor Nginx/Tomcat/MySQL with zabbix
- Zabbix monitors nginxa machine: zabbix server (192.168.234.128) b machine: zabbix client (192.168.234.125) Operation on b machine (zabbix client): edit nginx virtual host configuration file: [root@centos~]#vi/ etc/nginx/conf.d/default.conf Add the following content in server{}: location/nginx_status{stub_statuson;access_logoff;allow127.0.0.1;denyall;}Reload ngi
- Nginx 1542 2023-05-17 20:31:04
-
- What is Socket segmentation in Nginx server
- The 1.9.1 release of nginx introduced a new feature: allowing the use of the so_reuseport socket option, which is available in new versions of many operating systems, including dragonflybsd and Linux (kernel version 3.9 and later). This socket option allows multiple sockets to listen on the same IP and port combination. The kernel is able to load balance incoming connections across these sockets. (For nginxplus customers, this feature will appear in version 7, which will be released by the end of the year) The so_reuseport option has many potential practical applications. Other services can also use it to simply implement rolling upgrades during execution (nginx already supports rolling upgrades). right
- Nginx 713 2023-05-17 20:19:10
-
- Nginx configuration file example analysis
- Common 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 931 2023-05-17 19:25:04
-
- How to quickly install Nginx server on CentOS 6.6
- 1. Download nginx Download the latest version of nginx from the official website of nginx (http://nginx.org/en/download.html). Here I downloaded nginx-1.9.12. After the download is completed, you will get a compressed package as shown in the figure below. Upload the nginx tar package to the Linux server, as shown in the figure below: 2. Install nginx2.1. Installation prerequisites. Before installing nginx, you need to ensure that g++ and gcc are installed on the system. , openssl-devel, pcre-devel and zlib-devel software. 1. Install necessary software: yum-yinstallzli
- Nginx 1152 2023-05-17 19:18:05