<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>系统运维 &#187; nginx</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/nginx-2/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Tue, 14 Apr 2026 10:59:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>配置Nginx 四层（TCP和UDP）流量转发与七层（HTTP和HTTPS）代理支持SSL证书</title>
		<link>https://www.osyunwei.com/archives/17079.html</link>
		<comments>https://www.osyunwei.com/archives/17079.html#comments</comments>
		<pubDate>Wed, 01 Apr 2026 08:11:52 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=17079</guid>
		<description><![CDATA[需求分析： nginx默认不支持四层转发和七层代理使用SSL证书，必须要开启下面的模块才可以 --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module 操作步骤： 1、在编译安装nginx的时候加上这3个参数 #创建nginx安装目录 mkdir -p /data/server/nginx mkdir -p /data/server/nginx/packages mkdir -p /data/server/nginx/install #安装nginx #解压pcre cd /data/server/nginx/packages tar zxvf pcre2-10.47.tar.gz #解压zlib cd /data/server/nginx/packages tar zxvf zlib-1.3.2.tar.gz #解压openssl cd /data/server/nginx/packages tar zxvf openssl-3.6.1.tar.gz #安装nginx #nginx默认运行账号和组是Linux系统的内置账号和组nobody #创建nginx运行账号和组 cd /data/server/nginx/packages tar zxvf nginx-1.28.3.tar.gz cd nginx-1.28.3 ./configure \ --prefix=/data/server/nginx \ --user=autoops \ --group=autoops \ --without-http_memcached_module [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/17079.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/17079.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下编译安装Nginx</title>
		<link>https://www.osyunwei.com/archives/16822.html</link>
		<comments>https://www.osyunwei.com/archives/16822.html#comments</comments>
		<pubDate>Mon, 19 Jan 2026 09:40:25 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=16822</guid>
		<description><![CDATA[操作系统：Rocky Linux 10.x Rocky Linux 10.x系统安装配置图解教程 https://www.osyunwei.com/archives/15874.html 安装包下载： 1、nginx https://nginx.org/download/nginx-1.28.1.tar.gz 2、zlib https://www.zlib.net/zlib-1.3.1.tar.gz 3、pcre2 https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.gz 4、openssl https://github.com/openssl/openssl/releases/download/openssl-3.5.4/openssl-3.5.4.tar.gz 安装前准备： 1、防火墙配置 Rocky Linux默认使用的是firewall作为防火墙 firewall-cmd --list-all #显示所有规则（含服务、端口、区域） systemctl status firewalld #检查 firewalld 状态 #开放80 443 端口 firewall-cmd --permanent --add-port=80/tcp firewall-cmd --permanent --add-port=443/tcp firewall-cmd --reload #重新加载防火墙配置 2、关闭SELINUX vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存退出 setenforce 0 #使配置立即生效 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/16822.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/16822.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用Nginx实现HTTPS和SSH共用同一个端口访问各自服务</title>
		<link>https://www.osyunwei.com/archives/16800.html</link>
		<comments>https://www.osyunwei.com/archives/16800.html#comments</comments>
		<pubDate>Mon, 08 Dec 2025 09:12:03 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=16800</guid>
		<description><![CDATA[需求： 对外只能开放一个端口，要实现https服务，还要能通过ssh访问Linux服务器 分析： 可以使用Nginx的四层代理（stream 模块） 与 TLS 预读（ssl_preread） 功能 注意：HTTP协议无法通过stream模块的SNI识别，因为stream模块只能识别TLS握手包中的协议信息。 具体操作： Nginx 编译时要包含以下模块才可以： --with-stream --with-stream_ssl_preread_module 验证命令： /data/server/nginx/sbin/nginx -V 2&#62;&#38;1 &#124; grep -o 'with-stream\&#124;with-stream_ssl_preread_module' #有输出即支持 参考资料： Nginx 单端口兼容 HTTP 与 HTTPS：基于 stream 模块与 ssl_preread 的智能分流方案 准备就绪： SSH 服务运行在 22 端口（默认） HTTPS 服务运行在 另一个端口，例如28443 对外只开放9290端口 1、修改nginx配置文件 cp /data/server/nginx/conf/nginx.conf /data/server/nginx/conf/nginx.conf.bak 1.1在nginx主配置文件引入stream模块 mkdir -p /data/server/nginx/conf/stream #创建目录 vi /data/server/nginx/conf/nginx.conf #stream块必须在顶层，和 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/16800.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/16800.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx 单端口兼容 HTTP 与 HTTPS：基于 stream 模块与 ssl_preread 的智能分流方案</title>
		<link>https://www.osyunwei.com/archives/16788.html</link>
		<comments>https://www.osyunwei.com/archives/16788.html#comments</comments>
		<pubDate>Sun, 07 Dec 2025 15:18:53 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=16788</guid>
		<description><![CDATA[需求： 通过一个端口9190可以实现http和https同时访问 例如： http://10.189.189.189:9190/#/public/login https://10.189.189.189:9190/#/public/login 真实的地址是： http协议：http://10.189.189.189:9997/#/public/login https协议：http://10.189.189.189:28443/#/public/login 分析： 1、Nginx 本身无法使用1个端口同时处理 HTTP 和 HTTPS 请求 2、可以通过 stream 模块 + ssl_preread 实现： 监听同一个端口9190，自动识别客户端发来的是 HTTP 还是 HTTPS流量，并分别转发给后端的 HTTP（9997端口） 服务和 HTTPS （28443端口） 服务 3、这样就实现了只用1个端口可以同时访问http和https页面，这不属于“Nginx 在同一端口提供两种协议”，而是通过四层代理智能分流。 4、需要使用新版本的nginx，并启用 --with-stream 和 --with-stream_ssl_preread_module模块 具体操作： 1、检查nginx是否启用--with-stream 和 --with-stream_ssl_preread_module模块 /data/server/nginx/sbin/nginx -V 2&#62;&#38;1 &#124; grep -o 'with-stream\&#124;with-stream_ssl_preread_module' 2、重新编译nginx，添加模块 /data/server/nginx/sbin/nginx -V #查看nginx编译参数，如果未启用，需要添加上面两个模块，重新编译nginx ./configure --prefix=/data/server/nginx --user=www --group=www [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/16788.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/16788.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下编译安装部署Tengine</title>
		<link>https://www.osyunwei.com/archives/15640.html</link>
		<comments>https://www.osyunwei.com/archives/15640.html#comments</comments>
		<pubDate>Thu, 24 Apr 2025 06:25:08 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Tengine]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=15640</guid>
		<description><![CDATA[官方网站： https://tengine.taobao.org/ 下载地址： 1、tengine https://tengine.taobao.org/download_cn.html https://tengine.taobao.org/download/tengine-3.1.0.tar.gz 2、pcre https://ftp.pcre.org/pub/pcre/pcre-8.45.tar.gz 3、zlib https://zlib.net/fossils/zlib-1.3.tar.gz 4、openssl https://www.openssl.org/source/openssl-1.1.1k.tar.gz 创建相应目录： mkdir -p /data/server/tengine/packages mkdir -p /data/server/tengine/install 上传安装包到/data/server/tengine/packages目录下面 操作系统：openEuler、‌AnolisOS‌、AlmaLinux、Rocky Linux等 安装部署： 安装路径 tengine安装包存放目录：/data/server/tengine/packages tengine安装目录：/data/server/tengine tengine扩展安装目录：/data/server/tengine/install 1、关闭selinux sestatus #查看状态，显示disabled表示已经禁用 sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config #禁用selinux setenforce 0 #临时禁用 /usr/sbin/sestatus -v #查看selinux状态，disabled表示关闭 2、防火墙配置 2.1、关闭firewall systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/15640.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/15640.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 下添加Nginx 为系统服务</title>
		<link>https://www.osyunwei.com/archives/15414.html</link>
		<comments>https://www.osyunwei.com/archives/15414.html#comments</comments>
		<pubDate>Wed, 05 Mar 2025 10:44:22 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=15414</guid>
		<description><![CDATA[需求：把Windows版本的nginx添加为系统服务，并且设置为开机自启动 操作步骤： 1、下载Windows Service Wrapper工具 Winsw (Windows Service Wrapper) 可以将任何可执行文件配置成为能够在Windows系统后台自动启动、停止、重启的服务。 Winsw的工作原理是读取一个XML配置文件（通常命名为winsw.xml），在这个配置文件中定义了服务的名称、可执行文件路径、启动参数、服务描述、日志配置等信息。 通过运行Winsw提供的exe文件（如winsw.exe），根据XML配置来管理对应的应用程序作为服务。 官方网站：https://github.com/winsw/winsw 下载地址：https://github.com/winsw/winsw/releases/download/v2.12.0/WinSW-x64.exe 2、编写XML配置文件 文件名nginx-service.xml，添加下面的内容，特别注意格式缩进 &#60;!-- nginx-service.xml --&#62; &#60;service&#62; &#60;id&#62;nginx&#60;/id&#62; &#60;name&#62;nginx&#60;/name&#62; &#60;description&#62;nginx&#60;/description&#62; &#60;logpath&#62;C:\nginx\server-logs\&#60;/logpath&#62; &#60;logmode&#62;roll&#60;/logmode&#62; &#60;depend&#62;&#60;/depend&#62; &#60;executable&#62;C:\nginx\nginx.exe&#60;/executable&#62; &#60;stopexecutable&#62;C:\nginx\nginx.exe -s stop&#60;/stopexecutable&#62; &#60;/service&#62; nginx安装目录：C:\nginx 上传WinSW-x64.exe和nginx-service.xml到nginx安装目录：C:\nginx下面 修改WinSW-x64.exe名称为nginx-service.exe nginx-service.xml和nginx-service.exe这2名称要一致 3、添加服务 以管理员身份运行命令提示符，切换到C:\nginx下面 .\nginx-service.exe install #注册系统服务，如果系统没有安装.net，根据提示先安装 4、查看系统服务 在Windows下查看系统服务 服务类型：自动 点启动 应用-确定 nginx相关操作命令： 注册系统服务命令 .\nginx-service.exe install 删除已注册的系统服务命令 .\nginx-service.exe uninstall 停止对应的系统服务命令 .\nginx-service.exe stop [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/15414.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/15414.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx通过nginx-rtmp-module模块搭建流媒体服务器实现直播</title>
		<link>https://www.osyunwei.com/archives/14030.html</link>
		<comments>https://www.osyunwei.com/archives/14030.html#comments</comments>
		<pubDate>Wed, 27 Sep 2023 06:23:48 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=14030</guid>
		<description><![CDATA[准备篇 CentOS 7.x默认使用的是firewall作为防火墙，这里改为iptables防火墙。 1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2、安装iptables防火墙 RTMP基于TCP， 默认使用端口1935，再开放81端口 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do not ask us to add additional [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/14030.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/14030.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下Nginx版本平滑升级与回滚</title>
		<link>https://www.osyunwei.com/archives/12804.html</link>
		<comments>https://www.osyunwei.com/archives/12804.html#comments</comments>
		<pubDate>Wed, 03 Aug 2022 09:45:08 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=12804</guid>
		<description><![CDATA[操作系统：CentOS 7.x 准备篇 一、防火墙配置 CentOS 7.x默认使用的是firewall作为防火墙，这里改为iptables防火墙。 1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do not ask us to add [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/12804.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/12804.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下编译安装OpenResty</title>
		<link>https://www.osyunwei.com/archives/12543.html</link>
		<comments>https://www.osyunwei.com/archives/12543.html#comments</comments>
		<pubDate>Wed, 08 Jun 2022 08:58:29 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[OpenResty]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=12543</guid>
		<description><![CDATA[OpenResty® 是一款基于 NGINX 和 LuaJIT 的 Web 平台。 官方网站：https://openresty.org/cn/ 准备篇 一、防火墙配置 CentOS 8.x默认使用的是firewall作为防火墙，这里改为iptables防火墙。 1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/12543.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/12543.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Docker下使用Dockerfile构建Nginx容器镜像</title>
		<link>https://www.osyunwei.com/archives/11624.html</link>
		<comments>https://www.osyunwei.com/archives/11624.html#comments</comments>
		<pubDate>Mon, 09 Aug 2021 08:29:39 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=11624</guid>
		<description><![CDATA[一、CentOS 7.x 安装Docker-ce社区版本 https://www.osyunwei.com/archives/11592.html 二、构建Nginx容器镜像 1、准备软件包 cd /usr/local/src #建议先把需要安装的软件包下载到本地目录 wget http://nginx.org/download/nginx-1.21.1.tar.gz #nginx wget http://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz #nginx扩展 wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz #nginx扩展 wget http://www.zlib.net/zlib-1.2.11.tar.gz #nginx扩展 2、从docker hub拉取构建所需要的基础系统镜像 #我们用centos系统进行构建 https://hub.docker.com/_/centos?tab=tags&#38;page=1&#38;ordering=last_updated 选择centos:7.9.2009版本 docker pull centos:7.9.2009 #拉取系统镜像 docker image ls #查看docker镜像 docker run -itd --name centos7.9 centos:7.9.2009 #运行容器 docker ps #查看容器 [root@master01 opt]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/11624.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/11624.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian 10.9.x编译安装Nginx1.20.x+MySQL8.0.x+PHP8.0.x 7.4.x 7.3.x 7.2.x 7.1.x 7.0.x 5.6.x 5.5.x 5.4.x 5.3.x 5.2.x多版本全能环境</title>
		<link>https://www.osyunwei.com/archives/11344.html</link>
		<comments>https://www.osyunwei.com/archives/11344.html#comments</comments>
		<pubDate>Sun, 13 Jun 2021 07:50:05 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LNMP]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[lnmp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=11344</guid>
		<description><![CDATA[基础教程： Debian 10.9.x安装配置图解教程 https://www.osyunwei.com/archives/11103.html 准备篇： 一、配置防火墙，开启80端口、3306端口 Debian默认没有安装任何防火墙的，我们这里推荐使用iptables防火墙。 1.1安装iptables防火墙 whereis iptables #查看系统是否安装防火墙 apt-get install iptables #运行此命令安装防火墙 mkdir /etc/sysconfig #创建防火墙配置文件存放目录 touch /etc/sysconfig/iptables #创建防火墙配置文件 nano /etc/sysconfig/iptables #编辑添加防火墙规则 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do not ask us to add additional ports/services to this default configuration *filter :INPUT [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/11344.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/11344.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Server 20.04.x LTS编译安装Nginx1.20.x+MySQL8.0.x+PHP8.0.x 7.4.x 7.3.x 7.2.x 7.1.x 7.0.x 5.6.x 5.5.x 5.4.x 5.3.x 多版本全能环境</title>
		<link>https://www.osyunwei.com/archives/11183.html</link>
		<comments>https://www.osyunwei.com/archives/11183.html#comments</comments>
		<pubDate>Wed, 02 Jun 2021 06:16:28 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LNMP]]></category>
		<category><![CDATA[lnmp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=11183</guid>
		<description><![CDATA[基础教程： Ubuntu Server 20.04.1 LTS安装配置图解教程 https://www.osyunwei.com/archives/10727.html 准备篇： 一、配置防火墙，开启80端口、3306端口 1.1安装iptables防火墙 Ubuntu Server默认没有开启任何防火墙的，但是默认安装了ufw防火墙，我们这里推荐使用iptables防火墙。 ufw status #查看系统自带的ufw防火墙状态 Status: inactive #表示关闭 ufw disable #关闭ufw防火墙，参数enable是开启，我们这里关闭 apt-get remove ufw #卸载ufw apt-get purge ufw #清除ufw依赖包 whereis iptables #查看系统是否安装防火墙 apt-get install iptables #运行此命令安装防火墙 mkdir /etc/sysconfig #创建防火墙配置文件存放目录 touch /etc/sysconfig/iptables #创建防火墙配置文件 nano /etc/sysconfig/iptables #编辑添加防火墙规则 # sample configuration for iptables service # you can edit this [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/11183.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/11183.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rocky Linux 8.x编译安装Nginx1.20.x+MySQL8.0.x+PHP8.0.x PHP7.4.x 7.3.x 7.2.x 7.1.x 7.0.x 5.6.x 5.5.x 5.3.x 多版本全能环境</title>
		<link>https://www.osyunwei.com/archives/10917.html</link>
		<comments>https://www.osyunwei.com/archives/10917.html#comments</comments>
		<pubDate>Tue, 23 Mar 2021 11:28:29 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LNMP]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[lnmp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Rocky]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=10917</guid>
		<description><![CDATA[本文档最后更新于2021年5月28日 基础教程： Rocky Linux 8.x系统安装配置图解教程 https://www.osyunwei.com/archives/11453.html 准备篇 一、防火墙配置 Rocky Linux 8.x默认使用的是firewall作为防火墙，这里改为iptables防火墙。 1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/10917.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/10917.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx下配置支持ThinkPHP的pathinfo模式</title>
		<link>https://www.osyunwei.com/archives/9804.html</link>
		<comments>https://www.osyunwei.com/archives/9804.html#comments</comments>
		<pubDate>Mon, 28 Nov 2016 01:18:40 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[pathinfo]]></category>
		<category><![CDATA[ThinkPHP]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9804</guid>
		<description><![CDATA[说明： Nginx目录：/usr/local/nginx/ Nginx配置文件：/usr/local/nginx/nginx.conf 如果站点使用了vhost虚拟主机，并且只需要这一个虚拟主机支持pathinfo的，可以直接打开你的vhost的配置文件进行设置（绿色字为修改代码，蓝色字为增加代码）。 找到类似如下代码： location ~ .*\.(php&#124;php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; #原来的代码 ...... } 编辑配置文件为以下代码： location ~ \.php { #定义变量 $path_info ，用于存放pathinfo信息 set $path_info ""; #定义变量 $real_script_name，用于存放真实地址 set $real_script_name $fastcgi_script_name; #如果地址与引号内的正则表达式匹配 if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { #将文件地址赋值给变量 $real_script_name set $real_script_name $1; #将文件地址后的参数赋值给变量 $path_info set $path_info $2; } #配置fastcgi的一些参数 fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9804.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9804.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下nginx日志每天定时切割</title>
		<link>https://www.osyunwei.com/archives/9787.html</link>
		<comments>https://www.osyunwei.com/archives/9787.html#comments</comments>
		<pubDate>Tue, 08 Nov 2016 01:14:47 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[日志切割]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9787</guid>
		<description><![CDATA[教程目的： 使用Linux系统自带的命令logrotate对Nginx日志进行切割。 Nginx安装目录：/usr/local/nginx/ Nginx日志目录：/usr/local/nginx/logs/、/usr/local/nginx/logs/nginx_logs/ 1、添加nginx日志切割脚本 cd  /etc/logrotate.d  #进入目录 vi   /etc/logrotate.d/nginx   #编辑脚本 /usr/local/nginx/logs/*.log  /usr/local/nginx/logs/nginx_logs/*.log{ su root www missingok dateext notifempty daily rotate 7 create 0640 www adm sharedscripts postrotate if [ -f /usr/local/nginx/logs/nginx.pid ]; then kill -USR1 `cat /usr/local/nginx/logs/nginx.pid` fi endscript } :wq!  #保存退出 chmod +x  /etc/logrotate.d/nginx  ＃添加执行权限 chmod 644 /etc/logrotate.d/nginx  #修改权限 &#160; 2、执行脚本 /usr/sbin/logrotate -vf  [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9787.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9787.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
