current location:Home > Technical Articles > Operation and Maintenance > 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
    Nginx 996 2023-05-14 11:55:13
  • 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-
    Nginx 1119 2023-05-14 11:34:06
  • 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,
    Nginx 1339 2023-05-14 10:34:05
  • 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
    Nginx 980 2023-05-14 10:25:05
  • 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
    Nginx 1730 2023-05-14 09:58:05
  • 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
    Nginx 1736 2023-05-14 09:34:05
  • 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
    Nginx 1576 2023-05-14 08:58:12
  • 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
    Nginx 2364 2023-05-14 08:19:05
  • 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
    Nginx 576 2023-05-14 08:04:05
  • 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
    Nginx 1561 2023-05-13 23:58:04
  • 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.
    Nginx 5285 2023-05-13 23:43:04
  • nginx proxy_pass reverse proxy configuration example analysis
    nginx proxy_pass reverse proxy configuration example analysis
    Here is a small example: There is no nginx rpm package in the centos7 system library by default, so we need to update the rpm dependency library first. 1) Using yum to install nginx requires including the nginx library. Install the nginx library [root@ localhost~]#rpm-uvhhttp://nginx.org/packages/centos/7/noarch/rpms/nginx-release-centos-7-0.el7.ngx.noarch.rpm2) Use the following command to install nginx[root@ localhost~]#yuminstall
    Nginx 1152 2023-05-13 23:19:11
  • How to install nginx server and configure load balancing under Linux
    How to install nginx server and configure load balancing under Linux
    1. Set up a test environment. The test environment here is two lubuntu19.04 virtual machines installed through virtualbox. The Linux system installation method will not be described in detail. In order to ensure mutual access between two Linux virtual machines, in addition to the default NAT method, the network configuration of the virtual machine also uses the internal network (internal) networking method provided by the virtualbox software. In addition, the network cards associated with the "internal network" in the two virtual machines need to be bound to the static IP addresses of the same network segment, so that the two hosts form a local area network and can directly access each other. Network Configuration Open the virtualbox software, enter the settings interface of the two virtual machines, and add connections to them.
    Nginx 932 2023-05-13 23:19:04
  • How to configure nginx ssl certificate to achieve https access
    How to configure nginx ssl certificate to achieve https access
    1. Environment description Server system: ubuntu16.04lts Server IP address: 47.89.12.99 Domain name: bjubi.com 2. Domain name resolution to the server In Alibaba Cloud Console - Products and Services - Cloud Resolution DNS - Find the domain name that needs to be resolved, click "Resolve" ”, after entering the parsing page, select the [Add parsing] button and the following page will pop up: Select @ here for the host record, the record value is the server IP address, confirm. 3. Apply for the CA certificate in the Alibaba Cloud console - Products and Services - Security (Cloud Shield) - CA Certificate Service (Data Security), click to purchase the certificate, select "Free version dvssl", click Buy Now: Then click to pay: Finally Confirm payment: you will return to the management interface: click "Payment"
    Nginx 1986 2023-05-13 23:16:18
  • How to install nginx through yum in centos6.5
    How to install nginx through yum in centos6.5
    The following is: centos6.5 installs nginx through yum and prompts nopackagenginxavailable. You need to install epe first: yuminstallepel-release. After installing epel, yum-yinstallnginx is installed. After the installation is completed, servicenginxstart starts nginx. When you access the machine IP in the browser, you can see the nginx interface. If it cannot be accessed, check the Linux firewall status. After adding port 80 to access nginx, we need to modify the configuration file as needed. You can first use ps-ef|grepnginx to view the configuration file currently used by nginx.
    Nginx 846 2023-05-13 23:16:12

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!