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 solve the 403 problem caused by nginx configuration
- Solutions to 403 problems caused by nginx configuration 1. Problem: 403nginx_error.log log appears when curlnginx configures the local domain name as follows: 2. Question 1. www.requesturi.com is configured as follows: access is prohibited in the root directory and error log. The files are inconsistent. In theory, when accessing www.requesturi.com, you should search in /usr/local/nginx/html1. Why does it show that access to /usr/local/nginx/html is indeed prohibited? 2. Curl an a.txt file under /usr/local/nginx/html1
- Nginx 2270 2023-06-01 16:25:06
-
- How to modify Nginx files with centos7 docker
- 1. Install nginx with docker: It is very simple to install nginx with docker. 2. After installation, enter the docker container: execute the command: dockerexec-it container idbash. Note that the container must be open to enter. 3. Take modifying index.html of nginx as an example: 1. Enter the directory where the index is located: cdusr/share/nginx/html 2. Edit index.html, the key point is that an error will be reported here, as follows 3. It will prompt that there is no vim command, install it This command: apt-getinstallvim If unsuccessful, update the apt-get command: apt-getup
- Nginx 1322 2023-06-01 09:31:07
-
- Nginx high availability method
- Preparation work: 192.168.16.128 192.168.16.129 Two virtual machines. Install Nginx Install Nginx Update yum source file: rpm-ivhhttp://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm wget-O /etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Cent
- Nginx 1471 2023-05-31 15:04:06
-
- How to write nginx automation script
- This script can satisfy the operations of starting, stopping and restarting nginx#!/bin/bash./etc/init.d/functionsfunctionusage(){echo$"usage:$0{start|stop|restart}"exit1}functionstart() {/usr/local/nginx/sbin/nginxsleep1if[`netstat-antlpe|grepnginx|wc-l`-ge0];thenaction"nginxisstarted."
- Nginx 1706 2023-05-31 14:37:06
-
- How to deploy Nginx https website and configure address rewriting
- 1. Environment preparation: One centos6.9 host, turn off the firewall and selinux. Install dependency packages: yum-yinstallopenssl-develpcre-develgcc. Create nginx user: useradd-m-s/sbin/nologinnginx#Do not create a home directory for nginx users, and there is no interaction shelltar-xfnginx-1.8.0.tar.gzcdnginx-1.8.0./configure--user=nginx--group=nginx--prefix=/usr/local/nginx--with-h
- Nginx 1608 2023-05-31 12:53:12
-
- How to configure Nginx to detect service status
- 1. Check whether the check status module is installed; [root@localhost~]#nginx-vnginxversion:nginx/1.12.2builtbygcc4.8.520150623(redhat4.8.5-36)(gcc)configurearguments:--prefix=/usr/local/nginx- -with-http_sub_module2. If not installed, recompile and install; øcheck status module; --with-http_stub_status_module[root@localh
- Nginx 2328 2023-05-31 11:13:06
-
- How to set the access_log log of nginx
- There are two main instructions for nginx logs: 1) log_format: used to set the log format; 2) access_log: used to specify the storage path and format of the log file log_format log format 1. Syntax: log_formatname (format name) format style (that is, what you want What kind of log content is obtained) Example: log_formatmain'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent&
- Nginx 2985 2023-05-31 10:28:29
-
- How to use Nginx reverse proxy to solve cross-domain problems
- The problem is in the article about cross-domain resource sharing shared before. It is mentioned that when cross-domain, if you want to send cookies, access-control-allow-origin cannot be set to *. It must be specified clearly and consistent with the requested web page. domain name. I encountered such problems when collaborating with others during the development of this project. Generally speaking, the solution is to use cors cross-domain resource sharing with the backend to set access-control-allow-origin to the domain name visited. This requires the cooperation of the backend, and some browsers do not support it. Based on the cooperation with the partner's backend, the nginx direction proxy is used to satisfy the browser's same-origin policy to implement the cross-domain implementation method reverse proxy concept.
- Nginx 7062 2023-05-31 10:20:30
-
- What is the upstream configuration and function of nginx?
- Configuration example upstreambackend{serverbackend1.example.comweight=5;serverbackend2.example.com:8080;serverunix:/tmp/backend3;serverbackup1.example.com:8080backup;serverbackup2.example.com:8080backup;}server{location/{proxy_passhttp ://backend;}}Command syntax: upstreamname{.
- Nginx 2563 2023-05-30 22:28:04
-
- How to configure Nginx virtual host on CentOS
- Experimental environment A minimally installed centos7.3 virtual machine configures the basic environment 1. Install nginxyuminstall-yepel-*yumisntall-ynginxvim 2. Establish the site root directory of the virtual machine host mkdir/var/wwwrootmkdir/var/wwwroot/site1mkdir/var/ wwwroot/site2echo-e"site1">>/var/wwwroot/site1/index.htmlecho-e"site2">>/var/
- Nginx 1409 2023-05-30 21:45:29
-
- How to configure nginx page cache
- nginx page cache 1. Instruction description proxy_cache_path syntax: proxy_cache_pathpath[levels=number]keys_zone=zone_name:zone_size[inactive=time][max_size=size]; Default value: none Usage field: http directive specifies the cache path and some other parameters , the cached data is stored in a file, and the hash value of the proxy url is used as the key and file name. The levels parameter specifies the number of cached subdirectories, for example: proxy_cache_path/data/nginx/ca
- Nginx 3001 2023-05-30 19:13:30
-
- How to configure nginx log access_log
- The access log of the web server is very important. We can analyze the user's access through the access log, and we can also find some abnormal access, such as CC attacks, through the access log. Format: access_log/path/to/logfileformat; access_log can be configured in the http, server, and location configuration sections. Configuration example: server{listen80;server_namewww.xxx.com;root/data/wwwroot/www.xxx.com;indexindex.htmlindex.php;access_lo
- Nginx 2566 2023-05-30 18:28:06
-
- How to use Nginx web server caddy
- Introduction to Caddy Caddy is a powerful and highly scalable web server that currently has 38K+ stars on Github. Caddy is written in Go language and can be used for static resource hosting and reverse proxy. Caddy has the following main features: Compared with the complex configuration of Nginx, its original Caddyfile configuration is very simple; it can dynamically modify the configuration through the AdminAPI it provides; it supports automated HTTPS configuration by default, and can automatically apply for HTTPS certificates and configure it; it can be expanded to data Tens of thousands of sites; can be executed anywhere with no additional dependencies; written in Go language, memory safety is more guaranteed. First of all, we install it directly in CentO
- Nginx 2470 2023-05-30 12:19:45
-
- How to limit the number of connections in nginx speed limit
- Scenario: Company A has 100 people, and Company A only has one public IP. Assume that Company A may have 100 people downloading your website files at the same time. However, your connection limit configuration is: limit_conn_zone$binary_remote_addrzone=perip:1m;server{---limit_connperip1;limit_rate1024k;---} allows a single connection number, and the maximum bandwidth of a single connection is 1m. In this way, there will be 99 people with a request status of 503. Others must wait manually if they want to download (nginx will not notify users that user a has finished downloading, and it is your turn to download user b). The use caused by this
- Nginx 993 2023-05-30 11:19:05
-
- How to use Nginx_geo module to implement CDN scheduling
- To introduce the geo module of nginx, the geo instruction is provided by the ngx_http_geo_module module. By default, nginx loads this module unless artificially --without-http_geo_module. The ngx_http_geo_module module can be used to create variables whose values depend on the client IP address. The usage is as follows: geo command syntax: geo[$address]$variable{...} Default value: - Configuration section: http definition obtains the client's IP address from the specified variable. By default, nginx gets the client ip address from the $remote_addr variable, but it can also
- Nginx 1413 2023-05-30 10:27:18