Article Tags
How to customize logging and enable log buffer in Nginx

How to customize logging and enable log buffer in Nginx

Access log nginx writes information about a client's request in the access log immediately after processing the request. By default, the access log is located in logs/access.log, and information is written to the log in a predefined combination format. If you want to accurately record access information, you need to customize a more complete access log format, as shown below: http{log_formatgeoproxy'[$time_local]$remote_addr''$realip_remote_addr$remote_user''$request_m

May 14, 2023 pm 01:07 PM
nginx
How to configure keepalived dual-machine hot standby nginx

How to configure keepalived dual-machine hot standby nginx

Environment preparation: 2 centos: 192.168.0.105 and 192.168.0.118, the virtual IP (vip) is 192.168.0.119, configure keepavlived. Install keepalivedyuminstallkeepalived on 105 and 118 respectively. Prepare the heartbeat script. The configuration of keepalived is quite flexible, and the script command can be executed regularly. , used for heartbeat check. For example, when we access nginx and find that nginx is inaccessible, we turn off keepalived, thereby switching to nginx to achieve uninterrupted service support. vi/etc/keepalived

May 14, 2023 pm 12:34 PM
nginx keepalived
Nginx quick start example analysis

Nginx quick start example analysis

Why use nginx? At present, the main competitor of nginx is apache. Here I will make a simple comparison between the two to help everyone better understand the advantages of nginx. 1. As a web server: Compared with apache, nginx uses fewer resources, supports more concurrent connections, and reflects higher efficiency. This makes nginx especially popular with virtual host providers. In the case of high connection concurrency, nginx is a good substitute for the apache server: nginx is one of the software platforms often chosen by bosses in the virtual host business in the United States. It can support responses of up to 50,000 concurrent connections. Thanks to nginx for We chose epollan

May 14, 2023 pm 12:19 PM
nginx
How to quickly install Nginx server on CentOS

How to quickly install Nginx server on CentOS

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 tar package of nginx 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

May 14, 2023 pm 12:04 PM
CentOS nginx
How to enable nginx directory listing

How to enable nginx directory listing

nginx enables column directory When you want nginx to exist as a file download server, you need to enable nginx column directory server{locationdownload{autoindexon;autoindex_exact_sizeoff;autoindex_localtimeon;}}autoindex_exact_size: When it is on (default), the exact size of the file is displayed, in byte ;Change to off to display the approximate size of the file, in KB or MB or GBautoindex_localtime: When it is off (default), the file time displayed is GMT time; after changing to on, it is displayed

May 14, 2023 am 11:55 AM
nginx
How to build a high-performance load balancing cluster of Nginx+Tomcat

How to build a high-performance load balancing cluster of Nginx+Tomcat

nginx is a high-performance http server/reverse proxy server and email (imap/pop3) proxy server. It occupies less memory, has strong concurrency capabilities, and performs better among web servers of the same type. nginx can be compiled and run on most unixlinuxos, and there is a windows ported version. In general, for new sites, it is recommended to use the latest stable version as the production version. The maximum number of online visits supported by a single tomcat is about 500. If you want to support more visits, one tomcat cannot do it. Here we use cluster deployment, use multiple tomcats, and use nginx as the reverse proxy. The architecture is as follows: Preparation apache-

May 14, 2023 am 11:34 AM
nginx tomcat
How Nginx implements a simple front-end grayscale system

How Nginx implements a simple front-end grayscale system

As written above, the concept of grayscale comes from the field of digital images. It originally described the grayscale value of black and white digital images, ranging from 0 to 255, with 0 representing black, 255 representing white, and the values ​​in between represent different degrees of gray. The birth of the grayscale system stems from the construction of interdisciplinary subjects, and the Internet is no exception. For a software product, when developing and releasing it, we definitely hope that users can smoothly see the content they want to see. However, the release is not smooth sailing. If there is a problem in a certain link of the release, such as the wrong image or a hidden bug triggered due to different deployment environments, causing the user to see the wrong page or an old page, this will happen. Production accident. In order to avoid this situation, learn from the concept of digital image processing,

May 14, 2023 am 10:34 AM
nginx
How to solve the error when nginx calls php-fpm

How to solve the error when nginx calls php-fpm

After installing nginx and php-5.5, and configuring nginx to call php, start php-fpm. Use the following command to copy the code. The code is as follows:/usr/local/php/sbin/php-fpm and it can be started. Create a PHP detection script index.php in the nginx directory. As a result, when opening http://localhost/index.php, it is tragically found that it cannot be opened. Check the log file and check the reason for the error. Copy the code as follows: 2013/07/0122:34:26[error]3214#0:*64fastcgisentinstderr:&qu

May 14, 2023 am 10:25 AM
nginx php-fpm
How to solve the problem of being unable to obtain the real IP address of the client after Nginx reverse proxy

How to solve the problem of being unable to obtain the real IP address of the client after Nginx reverse proxy

When we use the Nginx proxy forwarding service, we will find that we cannot obtain the client's real IP address, and therefore cannot obtain the client's geographical location and other information. 1. The original configuration file is as follows worker_processes1;events{worker_connections1024;}http{includemime.types;default_typeapplication/octet-stream;sendfileon;keepalive_timeout65;server{listen80;server_namelocalhost;locatio

May 14, 2023 am 09:58 AM
nginx ip地址
How to install Nginx under centos6.5

How to install Nginx under centos6.5

1. Configure the yum source: Create the file: /etc/yum.repos.d/nginx.repotouch/etc/yum.repos.d/nginx.repo Edit the file, vi/etc/yum.repos.d/nginx.repo Write the following content: [nginx]name=nginxrepobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1 Save. The yum source configuration is completed. You can use the following command to check whether the yum source is configured correctly

May 14, 2023 am 09:34 AM
CentOS nginx
How to configure nginx and tomcat to access images and static pages

How to configure nginx and tomcat to access images and static pages

The first method: nginx configuration 1. Create the file path: [root@localhost/]#mkdir/data/soft/[root@localhost~]#cd/data/soft/[root@localhostsoft]#mkdirhtmlimages 2. In images Place pictures under the directory [root@localhostsoft]#cdimages/[root@localhostimages]#llTotal usage 80-rw-r--r--.1rootroot9503April 2517:06thpzfulfjn.jpg-r

May 14, 2023 am 08:58 AM
nginx tomcat
How to configure nginx to support .htaccess files to achieve pseudo-static

How to configure nginx to support .htaccess files to achieve pseudo-static

Many people who searched for information on Google said that nginx currently does not support .htaccess files. I tested it according to nginx rules and found that nginx fully supports .htaccess files! The method is as follows: 1. Create a new .htaccess file in the directory where you need to use the .htaccess file, such as one of my discuz forum directories: copy the code as follows: vim/var/www/html/168pc/bbs/.htaccess2. Inside Enter the rules. Here I enter the pseudo-static rules of discuz: Copy the code as follows: #nginxrewriterulerewrite

May 14, 2023 am 08:19 AM
nginx
What are the common operations of Nginx?

What are the common operations of Nginx?

Check nginx.conf for syntax errors [root@localhostconf]#/usr/local/nginx/sbin/nginx-tnginx:theconfigurationfile/usr/local/nginx/conf/nginx.confsyntaxisoknginx:configurationfile/usr/local/nginx/conf/ nginx.conftestissuccessful updates the configuration file to take effect [root@localhostconf]#/usr/local/n

May 14, 2023 am 08:04 AM
nginx
How to configure load balancing for TCP in Nginx server

How to configure load balancing for TCP in Nginx server

1. Install nginx1. Download nginx#wgethttp://nginx.org/download/nginx-1.2.4.tar.gz2. Download tcp module patch#wgethttps://github.com/yaoweibin/nginx_tcp_proxy_module/tarball/master source code homepage :https://github.com/yaoweibin/nginx_tcp_proxy_module3. Install nginx#tarxvfnginx-1.2.4.tar.gz#tarxvfyaow

May 13, 2023 pm 11:58 PM
TCP nginx
How to solve nginx cross-domain problem

How to solve nginx cross-domain problem

Separate the front-end and back-end, use nginx to solve cross-domain problems. Front-end: vue.js+nodejs+webpack, back-end: springboot reverse proxy server: nginx idea: package the front-end code, let nginx point to static resources, and nginx forwards the background request. 1. Package the front-end code: npmrunbuild will generate a dist folder. Contains an index.html file and a static folder. Take my local path as an example: /users/xxx/ideaprojects/webtest/dist2. Open nginx in the /usr/local/etc/nginx directory.

May 13, 2023 pm 11:43 PM
nginx

Hot tools Tags

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use