CentOS7 下使用 Nginx

摘要:
CentOS7下使用Nginx==分割==update:2019-11-04--使用更直接和简单的方式在CentOS(7.6)下安装Nginx(1.16.1),跳转查看2019-03-25--新增新装Nginx的启动、重启、关闭和查看2019-02-19--新增yum方式快速简单安装Nginx2018-09-29--新增配置文件对HTTPS的设定2018-05-23--新增常用命令和防火墙命令以yum方式安装Nginx之后如何查看whereisnginx其中默认运行程序是/usr/sbin/nginx(注意linux下没有扩展名),而默认配置文件是/etc/nginx/nginx.conf,如何查看和nginx有关的信息如版本、使用哪个配置文件等/usr/sbin/nginx-V检查nginx是否启动ps-ef|grepnginx以上命令列出master进程的PID,如果nginx在运行将会看到不少于两行的输出信息,记住master进程的进程号测试指定的配置文件是否正确/usr/sbin/nginx-t-c/etc/nginx/nginx.conf以上命令测试指定的配置文件是否正确,nginx并不实际运行,-t测试配置文件,-c指定所使用的配置文件测试通过,即可使用默认或指定的配置文件启动nginx/usr/sbin/nginx/usr/sbin/nginx-c/etc/nginx/nginx.conf上句为默认配置文件启动应用,下句为使用指定的配置文件启动,选择一种即可。Nginx支持以下信号量TERM,INT快速关闭QUIT优雅关闭HUP平滑重启USR1重新打开日志文件,在切割文件时用处较大USR2平滑升级WINCH从容关闭工作进程使用PID配合信号量即可进行对nginx的操作,如平滑重启kill-HUP<master进程号>也可以通过nginx-s[option]直接发信号给nginx主进程达到管理目的nginx-sstop快速关闭nginx-squit优雅关闭nginx-sreload重新载入配置文件nginx-sreopen重新开启日志文件(或)创建一个Nginx的启动脚本,拷贝到/etc/init.d目录下,就可以通过servicenginxstart等目录操作nginx#!/bin/sh#chkconfig:23458515#description:NginxServerNGINX_HOME=/usr/local/nginxNGINX_SBIN=$NGINX_HOME/sbin/nginxNGINX_CONF=$NGINX_HOME/conf/nginx.confNGINX_PID=$NGINX_HOME/logs/nginx.pidNGINX_NAME="Nginx"./etc/rc.d/init.d/functionsif[!-f$NGINX_SBIN]thenecho"$NGINX_NAMEstartup:$NGINX_SBINnotexists!"exitfistart(){$NGINX_SBIN-c$NGINX_CONFret=$?if[$ret-eq0];thenaction$"Starting$NGINX_NAME:"/bin/trueelseaction$"Starting$NGINX_NAME:"/bin/falsefi}stop(){kill`cat$NGINX_PID`ret=$?if[$ret-eq0];thenaction$"Stopping$NGINX_NAME:"/bin/trueelseaction$"Stopping$NGINX_NAME:"/bin/falsefi}restart(){stopstart}check(){$NGINX_SBIN-c$NGINX_CONF-t}reload(){kill-HUP`cat$NGINX_PID`&&echo"reloadsuccess!"}relog(){kill-USR1`cat$NGINX_PID`&&echo"relogsuccess!"}case"$1"instart)start;;stop)stop;;restart)restart;;check|chk)check;;status)status-p$NGINX_PID;;reload)reload;;relog)relog;;*)echo$"Usage:$0{start|stop|restart|reload|status|check|relog}"exit1esac内容借鉴自https://yq.aliyun.com/articles/44661此处为2019-02-19新增“yum方式快速安装nginx”内容基于华为云环境+《精通Nginx》,方法是先在Centos上先创建nginx.repo文件,然后用yum方式安装切到目录,打开编辑器cd/etc/yum.repos.dvi键入以下内容[nginx]name=nginxrepobaseurl=http://nginx.org/packages/centos/7/$basearch/gpgcheck=0enabled=1保存文件,退出vi:wnginx.repo:wq查看一下yum源信息是否符合yuminfonginx可以看到,现在(在之前运行时Version信息是1.12.2)版本是1.14.2,是编辑时官网能找到的最高stable版本,说明符合要求。安装yuminstallnginx下载rpm,说明是基于rpm包管理方式安装的,不同于官网下载tar.gz文件解压的源码安装方式完成的倒是齁快,此种方式将安装在系统默认目录下,当前的默认安装结果是/usr/sbin/nginx等多个,配置文件在/etc/nginx/下此种方式有一点不如源码编译方式,就是对目录的控制,此种方式执行文件、配置文件等默认分散了,而源码编译方式可以让其更像在Windows下的环境,都在一个根目录中。--以下为原文--还是练练编译安装吧先安装一些依赖sudoyuminstallgcc-c++sudoyuminstallpcrepcre-develsudoyuminstallzlibzlib-develsudoyuminstallopensslopenssl-develsudoyuminstallgccautomakeautoconflibtoolmake这些安装应该没有什么问题,如果yum源和网络正常的话都应该非常快的完成,因此截图省。检查已有的nginx,如有就卸载新系统没有安装过,因此找也找不到,卸载也不会成功。使用wget命令把源码包下载到本地一个路径下,如/usr/local/src或其他解压tar,省事儿的话就地释放(小经验,第一次以为参数f可以免除,结果进入了“空白”,后来发现-f是很重要的,其后面就直接接要处理的文件)sudotar-zxv-fnginx-1.12.1.tar.gz选择一个安装目录,将作为nginx被安装的地方,如/usr/local/nginx,设置nginx的编译参数,--prefix=设置安装路径,--with...一些编译参数sudo./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module--with-http_gzip_static_module设置好后执行编译make......太多省略部分......太多省略部分执行编译安装makeinstall安装倒是很快,可以看到自动创建了原来不存在的/usr/local/nginx文件夹,安装后目录的样子nginx主程序在sbin里,就一个可执行程序。查看一下80端口的占用netstat-ano|grep80启动nginxcd/usr/local/nginx/sbin./nginx遇到权限问题,先暴力解决一下,对nginx路径赋予权限sudochmod-Ra+rw/usr/local/nginx没消息就是好消息,继续启动一下试试出现此问题由于以非root权限启动,原因Linux只有root用户可以使用1024以下端口,解决方式以root权限启动或更改nginx配置(nginx.conf)端口改为1024以上,我当然选择sudo解决sudo./nginx终于见到可爱的Welcome界面!能运行的配置文件的样例(含HTTPS配置):#usernobody;worker_processes1;#error_loglogs/error.log;#error_loglogs/error.lognotice;#error_loglogs/error.loginfo;#pidlogs/nginx.pid;events{worker_connections1024;}http{includemime.types;default_typeapplication/octet-stream;#log_formatmain'$remote_addr-$remote_user[$time_local]"$request"'#'$status$body_bytes_sent"$http_referer"'#'"$http_user_agent""$http_x_forwarded_for"';#access_loglogs/access.logmain;sendfileon;#tcp_nopushon;#keepalive_timeout0;keepalive_timeout65;#gzipon;server{listen80;server_namelocalhost;charsetutf-8,gbk;#access_loglogs/host.access.logmain;location/{roothtml;indexindex.htmlindex.htm;}#error_page404/404.html;#redirectservererrorpagestothestaticpage/50x.html#error_page500502503504/50x.html;location=/50x.html{roothtml;}#proxythePHPscriptstoApachelisteningon127.0.0.1:80##location~.php${#proxy_passhttp://127.0.0.1;#}#passthePHPscriptstoFastCGIserverlisteningon127.0.0.1:9000##location~.php${#roothtml;#fastcgi_pass127.0.0.1:9000;#fastcgi_indexindex.php;#fastcgi_paramSCRIPT_FILENAME/scripts$fastcgi_script_name;#includefastcgi_params;#}#denyaccessto.htaccessfiles,ifApache'sdocumentroot#concurswithnginx'sone##location~/.ht{#denyall;#}}#anothervirtualhostusingmixofIP-,name-,andport-basedconfiguration##server{#listen8000;#listensomename:8080;#server_namesomenamealiasanother.alias;#location/{#roothtml;#indexindex.htmlindex.htm;#}#}#HTTPSserver##server{#listen443ssl;#server_namelocalhost;#ssl_certificatecert.pem;#ssl_certificate_keycert.key;#ssl_session_cacheshared:SSL:1m;#ssl_session_timeout5m;#ssl_ciphersHIGH:!aNULL:!MD5;#ssl_prefer_server_cipherson;#location/{#roothtml;#indexindex.htmlindex.htm;#}#}#confighttpssite#server{listen443ssl;server_nameabc.comwww.abc.com;roothtml;sslon;ssl_certificate../cert/1.crt;ssl_certificate_key../cert/1.key;location~.php${roothtml;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;includefastcgi_params;fastcgi_paramHTTPSon;}error_page404403/40x.html;location=/40x.html{roothtml;}}}安装目录/usr/local/nginx,目录下新建cert目录,存放两个ssl证书文件,配置文件存放在/usr/local/nginx/conf常用的命令:systemctlstart/stop/restartnginx(.service)从容停止kill-quitnginx命令方式启动nginx:切换到目录下时使用./nignx,完整目录使用/usr/local/nignx/sbin/nginxsystemctlstartfirewalld.service启动firewall,stop为关闭,disable为禁止开机启动curlhttp://localhostlinux本地测试访问netstat-tpln查看连接占用(比如80端口谁占着)一些记录和链接:Nginx中文:http://www.nginx.cn/doc参考《Nginx安装》:http://www.nginx.cn/install参考《【CNMP系列】CentOS7.0下安装Nginx服务》:http://www.cnblogs.com/riverdubu/p/6426852.html参考《CentOS7安装Nginx1.12.1》:http://www.cnblogs.com/holddie/p/7554399.html参考《CentOS7系统下用YUM安装Nginx详解》:https://yq.aliyun.com/ziliao/91819参考《centos6.9编译安装Nginx1.12.1》:http://www.mamicode.com/info-detail-1990967.html参考《nginx编译参数详解》:http://blog.sina.com.cn/s/blog_68c25adf01014037.html哪天找不到nginx可以:whereisnginxyum安装nginx:http://www.linuxidc.com/Linux/2016-04/130117.htm参考《Centos7上Nginx的使用》:http://www.cnblogs.com/edward2013/p/5373818.html

update:

2019-11-04 --使用更直接和简单的方式在 CentOS(7.6)下安装Nginx(1.16.1),跳转查看

2019-03-25 --新增新装 Nginx 的启动、重启、关闭和查看

2019-02-19 --新增 yum 方式快速简单安装 Nginx

2018-09-29 --新增配置文件对HTTPS的设定

2018-05-23 --新增常用命令和防火墙命令

以 yum 方式安装 Nginx 之后如何查看

whereis nginx

其中默认运行程序是 /usr/sbin/nginx(注意 linux 下没有扩展名),而默认配置文件是 /etc/nginx/nginx.conf,如何查看和 nginx 有关的信息如版本、使用哪个配置文件等

/usr/sbin/nginx -V

检查 nginx 是否启动

ps -ef|grep nginx

以上命令列出master进程的 PID,如果 nginx 在运行将会看到不少于两行的输出信息,记住 master 进程的进程号

测试指定的配置文件是否正确

/usr/sbin/nginx -t -c /etc/nginx/nginx.conf

以上命令测试指定的配置文件是否正确,nginx 并不实际运行,-t 测试配置文件, -c 指定所使用的配置文件

测试通过,即可使用默认或指定的配置文件启动 nginx

/usr/sbin/nginx
/usr/sbin/nginx -c /etc/nginx/nginx.conf

上句为默认配置文件启动应用,下句为使用指定的配置文件启动,选择一种即可。

Nginx 支持以下信号量

TERM, INT    快速关闭
QUIT         优雅关闭
HUP          平滑重启
USR1         重新打开日志文件,在切割文件时用处较大
USR2         平滑升级
WINCH        从容关闭工作进程

使用 PID 配合信号量即可进行对 nginx 的操作,如平滑重启

kill -HUP <master进程号>

也可以通过 nginx -s [option] 直接发信号给 nginx 主进程达到管理目的

nginx -s stop      快速关闭
nginx -s quit      优雅关闭
nginx -s reload    重新载入配置文件
nginx -s reopen    重新开启日志文件

(或)创建一个 Nginx 的启动脚本,拷贝到 /etc/init.d 目录下,就可以通过 service nginx start 等目录操作 nginx

#!/bin/sh
# chkconfig: 2345 85 15
# description:Nginx Server  
NGINX_HOME=/usr/local/nginx  
NGINX_SBIN=$NGINX_HOME/sbin/nginx  
NGINX_CONF=$NGINX_HOME/conf/nginx.conf  
NGINX_PID=$NGINX_HOME/logs/nginx.pid  
NGINX_NAME="Nginx"
. /etc/rc.d/init.d/functions  
if [ ! -f $NGINX_SBIN ]  
then  
    echo "$NGINX_NAME startup: $NGINX_SBIN not exists! "
    exit  
fi
start() {  
    $NGINX_SBIN -c $NGINX_CONF  
    ret=$?  
    if [ $ret -eq 0 ]; then
        action $"Starting $NGINX_NAME: " /bin/true  
    else
        action $"Starting $NGINX_NAME: " /bin/false  
    fi
}  
stop() {  
    kill `cat$NGINX_PID`  
    ret=$?  
    if [ $ret -eq 0 ]; then
        action $"Stopping $NGINX_NAME: " /bin/true  
    else
        action $"Stopping $NGINX_NAME: " /bin/false  
    fi
}  
restart() {  
    stop  
    start  
}  
check() {  
    $NGINX_SBIN -c $NGINX_CONF -t  
}  
reload() {  
    kill -HUP `cat $NGINX_PID` && echo "reload success!"
}  
relog() {  
    kill -USR1 `cat $NGINX_PID` && echo "relog success!"
}  
case "$1" in
    start)  
        start  
        ;;  
    stop)  
        stop  
        ;;  
    restart)  
        restart  
        ;;  
    check|chk)  
        check  
        ;;  
    status)  
        status -p $NGINX_PID  
        ;;  
    reload)  
        reload  
        ;;  
    relog)  
        relog  
        ;;  
    *)  
        echo $"Usage: $0 {start|stop|restart|reload|status|check|relog}"
        exit 1  
esac

内容借鉴自 https://yq.aliyun.com/articles/44661


此处为 2019-02-19新增“yum 方式快速安装 nginx”内容

基于华为云环境 + 《精通Nginx》,方法是先在Centos上先创建 nginx.repo 文件,然后用 yum 方式安装

切到目录,打开编辑器

cd /etc/yum.repos.d
vi

键入以下内容

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1

保存文件,退出 vi

:wnginx.repo
:wq

查看一下 yum 源信息是否符合

yum info nginx

CentOS7 下使用 Nginx第1张

可以看到,现在(在之前运行时 Version 信息是 1.12.2)版本是 1.14.2,是编辑时官网能找到的最高 stable 版本,说明符合要求。

安装

yum install nginx

CentOS7 下使用 Nginx第2张

下载 rpm,说明是基于 rpm 包管理方式安装的,不同于官网下载 tar.gz 文件解压的源码安装方式

CentOS7 下使用 Nginx第3张

完成的倒是齁快,此种方式将安装在系统默认目录下,当前的默认安装结果是 /usr/sbin/nginx 等多个,配置文件在 /etc/nginx/ 下

CentOS7 下使用 Nginx第4张

此种方式有一点不如源码编译方式,就是对目录的控制,此种方式执行文件、配置文件等默认分散了,而源码编译方式可以让其更像在 Windows 下的环境,都在一个根目录中。

--以下为原文--


还是练练编译安装吧

先安装一些依赖

sudo yum install gcc-c++
sudo yum install pcre pcre-devel
sudo yum install zlib zlib-devel
sudo yum install openssl openssl-devel
sudo yum install gcc automake autoconf libtool make

这些安装应该没有什么问题,如果 yum 源和网络正常的话都应该非常快的完成,因此截图省。

检查已有的 nginx,如有就卸载

CentOS7 下使用 Nginx第5张

新系统没有安装过,因此找也找不到,卸载也不会成功。

使用 wget 命令把源码包下载到本地一个路径下,如 /usr/local/src 或其他

CentOS7 下使用 Nginx第6张

CentOS7 下使用 Nginx第7张

解压 tar ,省事儿的话就地释放(小经验,第一次以为参数 f 可以免除,结果进入了“空白”,后来发现 -f 是很重要的,其后面就直接接要处理的文件)

sudo tar -zxv -f nginx-1.12.1.tar.gz

选择一个安装目录,将作为 nginx 被安装的地方,如 /usr/local/nginx,设置 nginx 的编译参数,--prefix= 设置安装路径,--with...一些编译参数

sudo ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module

CentOS7 下使用 Nginx第8张

CentOS7 下使用 Nginx第9张

CentOS7 下使用 Nginx第10张

设置好后执行编译

make

CentOS7 下使用 Nginx第11张

...... 太多省略部分

CentOS7 下使用 Nginx第12张

......太多省略部分

CentOS7 下使用 Nginx第13张

执行编译安装

make install

CentOS7 下使用 Nginx第14张

安装倒是很快,可以看到自动创建了原来不存在的 /usr/local/nginx 文件夹,安装后目录的样子

CentOS7 下使用 Nginx第15张

nginx 主程序在 sbin 里,就一个可执行程序。查看一下 80 端口的占用

netstat -ano|grep 80

启动 nginx

cd /usr/local/nginx/sbin
./nginx

CentOS7 下使用 Nginx第16张

遇到权限问题,先暴力解决一下,对 nginx 路径赋予权限

sudo chmod -R a+rw /usr/local/nginx

CentOS7 下使用 Nginx第17张

没消息就是好消息,继续启动一下试试

CentOS7 下使用 Nginx第18张

出现此问题由于以非root权限启动,原因 Linux 只有 root 用户可以使用 1024 以下端口,解决方式以 root 权限启动或更改 nginx 配置(nginx.conf) 端口改为 1024 以上,我当然选择 sudo 解决

sudo ./nginx

CentOS7 下使用 Nginx第19张

终于见到可爱的 Welcome 界面!

能运行的配置文件的样例(含 HTTPS 配置):

#user  nobody;
worker_processes  1;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid        logs/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
    #access_log  logs/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;
    #gzipon;
    server {
        listen       80;
        server_name  localhost;
        charset utf-8,gbk;
        #access_log  logs/host.access.log  main;
        location /{
            root   html;
            index  index.html index.htm;
        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~.php$ {
        #    proxy_pass   http://127.0.0.1;
#}
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
#
        #location ~ /.ht {
        #    deny  all;
        #}
    }
    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;
    #    location /{
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
    # HTTPS server
    #
    #server {
    #    listen       443ssl;
    #    server_name  localhost;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;
    #    location /{
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
    # config https site
    #
    server {
    listen        443ssl;
    server_name   abc.com www.abc.com;
    root          html;
    ssl  on;
    ssl_certificate      ../cert/1.crt;
    ssl_certificate_key  ../cert/1.key;
    location ~.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include      fastcgi_params;
        fastcgi_param HTTPS on;
    }
    error_page  404 403   /40x.html;
    location = /40x.html {
        root html;
    }
    }
}
  • 安装目录 /usr/local/nginx,目录下新建 cert 目录,存放两个ssl证书文件,配置文件存放在 /usr/local/nginx/conf

常用的命令:

  • systemctl start/stop/restart nginx(.service)
  • 从容停止 kill -quit nginx
  • 命令方式启动 nginx:切换到目录下时使用 ./nignx,完整目录使用 /usr/local/nignx/sbin/nginx
  • systemctl start firewalld.service 启动firewall,stop 为关闭,disable 为禁止开机启动
  • curl http://localhost linux本地测试访问
  • netstat -tpln 查看连接占用(比如80端口谁占着)

一些记录和链接:

  • Nginx 中文:http://www.nginx.cn/doc
  • 参考《Nginx 安装》:http://www.nginx.cn/install
  • 参考《【CNMP系列】CentOS7.0下安装Nginx服务》:http://www.cnblogs.com/riverdubu/p/6426852.html
  • 参考《CentOS7 安装 Nginx 1.12.1》:http://www.cnblogs.com/holddie/p/7554399.html
  • 参考《CentOS7系统下用YUM安装Nginx详解》:https://yq.aliyun.com/ziliao/91819
  • 参考《centos 6.9 编译安装 Nginx1.12.1》:http://www.mamicode.com/info-detail-1990967.html
  • 参考《nginx 编译参数详解》:http://blog.sina.com.cn/s/blog_68c25adf01014037.html
  • 哪天找不到 nginx 可以:whereis nginx
  • yum安装nginx:http://www.linuxidc.com/Linux/2016-04/130117.htm
  • 参考《Centos7 上 Nginx 的使用》:http://www.cnblogs.com/edward2013/p/5373818.html

免责声明:文章转载自《CentOS7 下使用 Nginx》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇sql server 中的分区函数用法(partition by 字段)public, protected, private, internal, protected internal简析下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

随便看看

Core Dump

什么是在接收到某些特定信号后终止的核心转储程序?在终止过程中,将生成一个核心文件。核心文件包含程序终止时的内存状态。此过程称为coredump。默认情况下,内核在coredump期间生成的核心文件与程序放在同一目录中,文件名固定为core。通过修改内核参数,我们可以指定内核生成的coredump文件的文件名。应该注意,内核中还有一个与coredump相关的设...

配置nginx

aNULL:!MD5:!...

.NET5 ABP框架(一)

授权-ABP可以以声明的方式检查权限。如果发生异常,ABP将自动记录并向客户机返回适当的结果。默认情况下,ABP使用Log4Net写入日志。当然,我们也可以通过修改配置来使用其他日志框架。除了本示例中显示的ABP的优点之外,ABP还提供了一个健壮的基础架构和应用程序模型。...

WinForm 中 comboBox控件之数据绑定

作为列表类型,public class Info{public string Id{get;Name=“Li Si”};infoList.Add(info3);...

Makefile系列之三 : 变量

第二个语法是针对于make命令行带入的变量,或是系统环境变量。...

使用代理软件之后其他软件不能联网的解决方法

可能是代理软件打开后,代理端口被自动修改,但我们没有正常关闭代理软件。代理端口没有在此代理模式下切换回来,因此我们仍然使用全局代理,但没有打开代理软件。此时,网络无法正常连接。此时,其他软件可以正常使用,但使用全局代理的速度非常慢。除非您需要FQ,否则不建议对通用软件使用全局代理。...