current location:Home > Technical Articles > Operation and Maintenance > Nginx

  • How to solve the problem 'Welcome to nginx on Fedora!' after installing nginx in Centos7
    How to solve the problem 'Welcome to nginx on Fedora!' after installing nginx in 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 1302 2023-05-20 18:22:27
  • How to solve the problem that the port is occupied when opening Nginx
    How to solve the problem that the port is occupied when opening Nginx
    As shown in the figure: Check the port occupancy: sudonetstat-apn|grep80 Check the process occupying the port: ps-ef|grep3345 From the results, we can see that port 80 is occupied by nginx itself. You can kill the process and restart nginxsudokill-93345sudonetstat-apn |After grep80 successfully kills the process, start nginx. Start nginx successfully. Enter the IP address of the system where nginx is located in the browser to verify whether nginx starts successfully. The following introduces the startup, stop and restart of nginx. The startup code format: nginx installation directory address - cnginx configuration file address for example: [
    Nginx 5481 2023-05-20 17:46:06
  • How to use Nginx to handle Vue's development environment
    How to use Nginx to handle Vue's development environment
    1. The local test domain name needs to be the same as the online domain name in order to correctly deliver cookies and perform SSO testing. Note: Since the relevant cookies are added to the fourth-level domain name after sso login, the local test domain name and the online interface domain name need to be the same. 2. The plan is to configure the host file so that the online domain name points to localhost: 127.0.0.1product.xxx.xxx.com and configure nginx for corresponding forwarding: server{listen80;listen[::]:80;server_name${product.xxx.xxx. com};location/api{proxy_passhtt
    Nginx 1198 2023-05-20 17:16:06
  • How to configure a reverse proxy using Nginx
    How to configure a reverse proxy using Nginx
    General configuration Under normal circumstances, friends who are familiar with nginx know that if you need to configure a reverse proxy, just write a location context and proxy module. If you need to customize the prefix, use a rewrite module. A simple example is as follows: location~/dfs/group([0-9]){proxy_passhttp://localhost:8080;rewrite^/dfs/(.*)$/$1break;proxy_set_headerhost$host:$server_port;proxy_set_headerx-real -ip$re
    Nginx 2097 2023-05-20 16:28:06
  • How to speed up nginx performance
    How to speed up nginx performance
    Turn on gzip configuration #Turn on gzipgzipon;#The minimum file to enable gzip compression, files smaller than the set value will not be compressed gzip_min_length1k;#gzip compression level, 1-10, the larger the number, the better the compression, and the more CPU time will be taken up, later There will be detailed descriptions of gzip_comp_level2;# file types for compression. JavaScript comes in many forms. The values ​​can be found in the mime.types file. gzip_typestext/plainapplication/javascriptapplication/x-javascripttext/c
    Nginx 982 2023-05-20 15:25:14
  • How to deploy and run CentOS7 Docker Nginx
    How to deploy and run CentOS7 Docker Nginx
    1. Resource preparation dockerfile file#"ported"byadammillerfrom#https://github.com/fedora-cloud/fedora-dockerfiles##originallywrittenforfedora-dockerfilesby#scollierfromcentos:centos7maintainerthecentosprojectrunyum-yupdate;yumcleanallrunyum-yinstallepel-relea
    Nginx 813 2023-05-20 15:19:06
  • How to solve nginx 502 Bad Gateway error
    How to solve nginx 502 Bad Gateway error
    Trigger conditions for nginx502 The most common occurrence of 502 errors is when the backend host crashes. There is such a configuration in the upstream configuration: proxy_next_upstream. This configuration specifies what kind of errors nginx encounters when fetching data from a back-end host. It will go to the next back-end host. What is written in it is all the 502s that will appear. In this case, the default is errortimeout. Error refers to crashes, disconnections, etc. Timeout refers to read blocking timeout, which is easier to understand. I usually write it all: proxy_next_upstreamerrortimeoutinvalid_headerhtt
    Nginx 4600 2023-05-20 15:16:06
  • How to configure port forwarding of non-80 ports in Nginx server
    How to configure port forwarding of non-80 ports in Nginx server
    nginx can be easily configured as a reverse proxy server: server{ listen80; server_namelocalhost; location/{ proxy_passhttp://x.x.x.x:9500; proxy_set_headerhost$host:80; proxy_set_headerx-real-ip$remote_addr; proxy_set_headerx-forwarded-for$proxy_add_x_forwarded_ for ; proxy_se
    Nginx 1790 2023-05-20 15:04:18
  • How to deploy nginx, php and virtual host configuration in CentOS environment
    How to deploy nginx, php and virtual host configuration in CentOS environment
    Deployment time: 2012-07-24os environment: centos6.1nginx: nginx-1.2.2php:php5.3.140, install the dependency package and copy the code as follows: yuminstallopenssl-develpcre-develzlib-devellibjpeg-devellibpng-develfreetype-develgccmake1, add www user To execute nginx, copy the code as follows: useradd-m-r-s/sbin/nologin-d/opt/web/www2. Create a temporary directory. Copy the code as follows: mk
    Nginx 1214 2023-05-20 14:25:06
  • How to configure Tcp load balancing in Nginx
    How to configure Tcp load balancing in Nginx
    This article uses Nginx as a proxy server for load balancing. It is just a simple application example and does not involve principles. (The hosts here are limited. Port 8000 of the 42.192.22.128 host is used as the proxy server listening port, and 8181 is the service listening port.) The client accesses the proxy server, and the proxy server distributes the request to the corresponding server. Modify the Nginx configuration file to configure Tcp load balancing (the configuration file is in /usr/local/nginx/conf/nginx.config after Nginx installation, and the Nginx executable program is in the /usr/local/nginx/sbin directory) in nginx. conf configuration file
    Nginx 2641 2023-05-20 13:16:20
  • How to configure Nginx reverse proxy under Linux
    How to configure Nginx reverse proxy under Linux
    In addition to preventing vicious attacks from the external network on the intranet server, caching to reduce server pressure and access security control, using a reverse proxy can also perform load balancing and distribute user requests to multiple services. 1. Upgrade the system, uninstall Apache to release port 80 Yumupdate-yYumremovehttpd-y2, and install EPELreporpm-Uvhhttp://mirror.ancl.hawaii.edu/linux/epel/6/i386/epel-release-6-8.noarch.rpmEPELrepo Download address: https://fedoraproject.org
    Nginx 1116 2023-05-20 13:07:06
  • How to bind nginx reverse proxy secondary domain name
    How to bind nginx reverse proxy secondary domain name
    1. Application scenarios We often encounter situations where multiple web sites are established on the same server. A common approach is to configure different ports for different sites so that they can be accessed in the form of ip:port. But after all, using IP to access is inconvenient, not vivid, and not easy to remember. Then, we can bind different domain names to each site. (Here we only talk about the public network situation) Even if we only have one domain name, we can set up multiple second-level domain names, which is easy to achieve using nginx. 2. Basic requirements Usually, online tutorials will directly post a piece of code for the configuration file and tell us that this is OK. But I found that many novices cannot succeed like bloggers after looking at the tutorial configuration, so next I
    Nginx 2122 2023-05-20 10:55:24
  • How to install and tune Nginx
    How to install and tune Nginx
    Optimization before Nginx compilation [root@linuxprobe~]#wgethttp://nginx.org/download/nginx-1.10.1.tar.gz[root@linuxprobe~]#tarxvfnginx-1.10.1.tar.gz-C/ usr/local/src/[root@linuxprobe~]#cd/usr/local/src/nginx-1.10.1/ Pre-compilation optimization is mainly used to modify the program name, etc., for example: [root@linuxprobenginx-1.10. 1]#curl-Ihtt
    Nginx 1306 2023-05-20 09:55:20
  • Analysis of nginScript examples of nginx
    Analysis of nginScript examples of nginx
    Let me first briefly talk about nginxnginx [enginex], which is the most popular and best web server and reverse proxy server in the world. According to statistics from third-party companies, at least 23% of servers around the world currently use nginx, and of course this number is still expanding. It is also the first choice for domestic BAT, so this is why we paid attention to it for the first time. nginx can mainly do the following: 1. Working on the seventh layer of tcp, it can analyze and process all contents of the http protocol. 2. Support lua, perl, javascript dynamic language 3. Support third-party plug-ins Let’s talk about nginscript1. nginscript is java
    Nginx 585 2023-05-20 09:52:05
  • How nginx+iis implements simple load balancing
    How nginx+iis implements simple load balancing
    1. nginx installation nginx is a lightweight web server/reverse proxy server and email (imap/pop3) proxy server, and is released under a bsd-like protocol. It was developed by Russian programmer igorsysoev and is used by Russia's large portal website and search engine Rambler (Russian: рамблер). 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. Users of nginx websites in mainland China include: Baidu, Sina, NetEase, Tencent, etc. The latest version of nginx is 1.9.3. The one I downloaded is the window version.
    Nginx 899 2023-05-20 09:43:05

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!