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 compile NGINX and support PHP
- Prerequisites Before starting the installation, make sure that the gcc, make, and zlib-devel packages are installed on your system. These packages can be installed with the following command: $sudoyuminstallgccmakezlib-devel Download and Unzip First, you need to download the NGINX source code. You can download the latest version from the official website. $wgethttps://nginx.org/download/nginx-1.19.2.tar.gz Decompress the downloaded file: $tar-zxvfnginx-1.19.2.tar.gz Enter the decompression directory: $cdnginx-1.19.2 compile and install To compile
- Nginx 1220 2023-05-18 19:50:44
-
- How to use Nginx open source visual configuration tool NginxConfig
- Introduction to NginxConfig NginxConfig is known as the only Nginx configuration tool you need. It can use a visual interface to generate Nginx configuration. It is very powerful and has 15K+ stars on Github! Below is a rendering of the use of NginxConfig, you can take a look! Installation Next, we will introduce the installation of NginxConfig. It is relatively convenient to install it on Linux. Install Node.js Since NginxConfig is a front-end project based on Vue, we must first install Node.js. First download the Node.js installation package download address from the official website: https://nodejs
- Nginx 2886 2023-05-18 19:29:12
-
- How Nginx uses ngx_http_upstream_module to implement load balancing function
- Load balancing introduces what is load balancing Load balancing (LoadBalance) means balancing and allocating loads (work tasks, access requests) to multiple operating units (servers, components) for execution. Why is load balancing needed? When a single web server faces users directly, it may carry a large number of concurrent requests. A single server may be difficult to load. We need to use multiple web servers to form a cluster and use the Nginx load balancing function to distribute requests to Different back-end servers realize load traffic distribution, improve overall performance, and system disaster recovery capabilities. What is the difference between load balancing and proxy? A proxy is a proxy that schedules a server based on URI and schedules it to load balancing application nodes with different functions.
- Nginx 804 2023-05-18 19:01:24
-
- How to use Nginx as a cache server and delete its cache files
- The requirement for using nginx as a cache server is to cache android software packages, and the suffix is apk. Without further ado, let’s go directly to the configuration, for reference: a-->nginx.confuserwwwwww;worker_processes8;error_log/data/logs/nginx_error.logcrit;pid/usr/local/nginx/nginx.pid;worker_rlimit_nofile204800;events{useepoll; worker_connections204800;}http{inc
- Nginx 1632 2023-05-18 18:49:06
-
- How to install nginx in a custom directory in centos8
- 1. Install tools and libraries #pcre is a perl library, including a perl-compatible regular expression library. nginx's http module uses pcre to parse regular expressions #The zlib library provides many compression and decompression methods. nginx uses zlib to perform gzipyum-yinstallgcc-c++pcrepcre-develzlibzlib-developensslopenssl-devel2. Directory structure Source code directory: /home/werben/pkgsrc/nginx Installation directory: /home/werben/application/nginx
- Nginx 1132 2023-05-18 18:16:06
-
- How to implement load balancing polling configuration in nginx
- 1. Overview of the allocation algorithm currently supported by Nginx upstream: 1. Round-robin polling 1:1 takes turns to process requests (default). Each request is allocated to a different application server one by one in chronological order. If the application server goes down, it will be automatically eliminated. , and the rest continue to poll. 2. Weight weight (weighted polling) configures the weight and specifies the polling probability. The weight is proportional to the access ratio and is used when the application server performance is uneven. 3. The ip_hash hash algorithm assigns each request according to the hash result of the accessed IP, so that each visitor has fixed access to an application server, which can solve the problem of session sharing. If the application server fails, it needs to be shut down manually. Parameters include
- Nginx 2277 2023-05-18 17:58:21
-
- How to install Nginx under Centos
- nginx ("enginex") is a lightweight http and reverse proxy server. Compared with apache, lighttpd, etc., it has the advantages of less memory, strong concurrency, and high stability. Its most common use is to provide reverse proxy services. Under Linux, we need to download the nginx source code package and compile it manually instead of using package management tools such as yum and aptitude to install it. Because we need to configure nginx during compilation, we have to compile it manually, which also relies on some tools and library files. First, you need to install a C language compilation environment, because nginx is written in C language. Usually most linu
- Nginx 1851 2023-05-18 17:13:27
-
- How Nginx and Tomcat achieve dynamic and static separation and load balancing
- one. Introduction to nginx: nginx is a high-performance http and reverse proxy server with high stability and supports hot deployment and easy module expansion. When encountering a peak of access, or someone maliciously initiates a slow connection, it is also likely to cause the server's physical memory to be exhausted and frequently exchanged, resulting in loss of response. The server can only be restarted. nginx adopts a phased resource allocation technology to process static files and Cache-free reverse proxy acceleration achieves load balancing and fault tolerance, and can withstand high concurrency processing in such high-concurrency access situations. two. nginx installation and configuration Step 1: Download the nginx installation package Step 2: Install nginx#tarzxvfnginx-1.7.8 on Linux.
- Nginx 928 2023-05-18 17:10:06
-
- How to output php error log file in nginx
- To configure Nginx to output PHP error log files, we need to add some configuration items to the Nginx configuration file. On CentOS systems, the Nginx configuration file is usually located at /etc/nginx/nginx.conf. Find the configuration section of the http module in the file, usually at the top of the file, and add the following configuration items: http{...server{...location~\.php${fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php ;fastcgi_paramSCRIPT_FILENAME$document_r
- Nginx 1348 2023-05-18 16:59:04
-
- How to achieve load balancing in CentOS based on nginx reverse proxy
- The advantages of nginx for load balancing: 1. It works above the 7th layer of the network and can make some diversion strategies for http applications, such as domain names and directory structures. Its regular rules are more powerful and flexible than haproxy, which is why it One of the main reasons for its widespread popularity is that nginx can be used in far more situations than lvs based on this alone. 2. nginx relies very little on network stability. In theory, it can perform load functions if it can be pinged. This is also One of its advantages; on the contrary, lvs relies heavily on network stability, which I have a deep understanding of. 3. nginx is relatively simple to install and configure, and it is more convenient to test. It can basically print out errors in logs. The configuration and testing of lvs takes more than
- Nginx 1200 2023-05-18 16:49:06
-
- How to solve the error 'Welcome to nginx on Fedora!' after installing nginx on Centos7
- Problem description: When installing nginxsudoyuminstallnginx on Tencent Cloud centos7, open the default webpage and display welcometonginxonfedora! And there is no default.conf file in the /etc/nginx/conf.d directory. Reason: Tencent Cloud’s epel source is downloaded by default, which is fedora. Solution • Preparation sudoyuminstallyum- utils • Create nginx.repo file sudovim /etc/yum.repos.d/nginx.repo and add the following content [nginx-stable] name=nginxstab
- Nginx 860 2023-05-18 16:34:11
-
- How to set directory whitelist and ip whitelist in nginx
- 1. Set the directory whitelist: There is no restriction on the specified request path. If there is no restriction on the request path to the api directory, it can be written as server{location/app{proxy_passhttp://192.168.1.111:8095/app ;limit_connconn20;limit_rate500k;limit_reqzone=fooburst=5nodelay;}location/app/api{proxy_passhttp://192.168.1.111:8095/app/api}}#Because nginx will give priority to accurate matching
- Nginx 1837 2023-05-18 15:52:46
-
- Nginx brief installation and configuration example analysis
- 1. Files required for nginx installation 1), nginx-1.2.8.tar.gz2), openssl-1.0.1g.tar.gz3), pcre-8.31.tar.gz4), zlib-1.2.7.tar.gz The download address of the above installation package is normally available. Since I am using the above version of the installation package, the following installations are based on this. 2. Configuration environment of linux machine 2.1, java environment $java-versionjavaversion"1.8.0_45"java(tm)seruntimeenvironment(build1.8.0_
- Nginx 988 2023-05-18 15:34:15
-
- How to configure nginx read-write separation
- Reading and writing separation of nginx 1. Analysis of experimental topology requirements, one nginx at the front end as a load balancing reverse proxy, and two httpd servers at the back. The entire architecture is to provide bbs (forum) services. There is a need to achieve separation of reading and writing, which is the function of uploading attachments. The attachments we upload can only be uploaded to web1, and then rsync+inotify is used to synchronize attachments on web1. Everyone knows rsync. +inotify can only synchronize from master to slave, not bidirectional synchronization. Therefore, web1 can perform write operations, while web2 can only perform read operations, which brings about the need for separation of reading and writing. Let's talk about how to achieve separation of reading and writing. 2.webdav function descriptionwebdav(w
- Nginx 1452 2023-05-18 15:19:57
-
- How to check the compilation parameters of nginx, apache, mysql, php under Linux
- Quickly check the compilation parameters of the server software: 1. nginx compilation parameters: your_nginx_dir/sbin/nginx-v2, apache compilation parameters: catyour_apache_dir/build/config.nice3, php compilation parameters: your_php_dir/bin/php-i|grepconfigure4, mysql compilation Parameters: catyour_mysql_dir/bin/mysqlbug|grepconfigure The following is a complete practical example: View and obtain nginx compilation parameters: Copy the code The code is as follows: [root@www~
- Nginx 1058 2023-05-18 14:16:06