<?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>nginx &#8211; moneyslow.com</title>
	<atom:link href="https://moneyslow.com/tag/nginx/feed" rel="self" type="application/rss+xml" />
	<link>https://moneyslow.com</link>
	<description>making money with technology</description>
	<lastBuildDate>Fri, 28 Feb 2025 13:38:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
	<item>
		<title>Nginx 根据请求来源 IP 地址决定是否进行 301 跳转</title>
		<link>https://moneyslow.com/nginx-%e6%a0%b9%e6%8d%ae%e8%af%b7%e6%b1%82%e6%9d%a5%e6%ba%90-ip-%e5%9c%b0%e5%9d%80%e5%86%b3%e5%ae%9a%e6%98%af%e5%90%a6%e8%bf%9b%e8%a1%8c-301-%e8%b7%b3%e8%bd%ac.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 28 Feb 2025 13:38:51 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=20092</guid>

					<description><![CDATA[如果ip很少的情况： 解释：if ($remote_addr = "192.168.0.1")：判断请求的来源 IP 是否为 192.168.0.1。break;：如果条件成立，则不进行跳转，继续处理请求。return 301 https://x.com$request_uri;：如果条件不成立，则执行 301 跳转。注意事项：使用 if 指令时要注意性能问题，尤其是在高并发场景下。if 指令在某些情况下可能会导致性能下降，因此建议在测试环境中充分测试后再应用到生产环境。如果有多个 IP 需要排除跳转，可以使用 map 指令来优化配置，避免多个 if 语句。 如果有多个 IP 需要排除跳转，可以使用 map 指令来优化配置: 在这个配置中，map 指令用于定义一个变量 $skip_redirect，根据 $remote_addr 的值来决定是否跳过跳转。这样可以更高效地处理多个 IP 的情况。]]></description>
		
		
		
			</item>
		<item>
		<title>2024年如何安装Linux, Nginx, MySQL, PHP (LEMP stack) wordpress on Ubuntu22.04</title>
		<link>https://moneyslow.com/2024%e5%b9%b4%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85linux-nginx-mysql-php-lemp-stack-on-ubuntu22-04.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Wed, 16 Oct 2024 07:57:22 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=19346</guid>

					<description><![CDATA[新装的ubuntu22.04 (在interserver购买的vps) ，下面步骤直接操作： apt updateapt install nginx 查看防火墙的可配置文件的选项，便于后面的规则添加： 和防火墙的现在的运行状态： inactive表示防火墙并没有启用，把它开启，先开启ssh，别把自己关到外面，再配置web服务器，还没有签证书，只开80端口就可以： 这样，防火墙开启了，并且有了2条规则，80和22 查看自己的ip：curl -4 icanhazip.com ，此时可以通过ip访问nginx 下面安装mysql： apt -y install mysql-server 运行 mysql_secure_installation 安全配置，安全最重要！！！ 直接就可以进入mysql： 下面安装php： apt -y install php8.1-fpm php-mysql 先看看nginx的启动用户是哪个： 下面配置nginx的php解析，就使用用户www-data mkdir -p /var/www/us.moneyslow.comchown -R www-data:www-data /var/www/us.moneyslow.com 我们只用/etc/nginx/conf.d下的配置文件，其他地方的都删掉： # rm -rf /etc/nginx/sites-enabled/# rm -rf /etc/nginx/sites-available/ vi /etc/nginx/conf.d/us.moneyslow.conf 测试配置文件，并重启nginx： 在/var/www/us.moneyslow.com目录下创建一个php的测试文件：index.php 可以访问到php页面： 这样基本就ok了，更详细的测试数据库的文档可以参考： https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu 如果进一步安装wordpress，可以参考： https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-22-04]]></description>
		
		
		
			</item>
		<item>
		<title>批量修改nginx配置文件</title>
		<link>https://moneyslow.com/%e6%89%b9%e9%87%8f%e4%bf%ae%e6%94%b9nginx%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Mon, 02 Sep 2024 01:39:15 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=19004</guid>

					<description><![CDATA[nginx批量生成修改配置文件]]></description>
		
		
		
			</item>
		<item>
		<title>nginx配置各种代理场景语法</title>
		<link>https://moneyslow.com/nginx%e9%85%8d%e7%bd%ae%e5%90%84%e7%a7%8d%e4%bb%a3%e7%90%86%e5%9c%ba%e6%99%af%e8%af%ad%e6%b3%95.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 31 May 2024 03:08:24 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=18670</guid>

					<description><![CDATA[备忘：nginx代理配置语法]]></description>
		
		
		
			</item>
		<item>
		<title>nginx安全配置add_header最佳实践（securityheaders测试A+）</title>
		<link>https://moneyslow.com/nginx%e5%ae%89%e5%85%a8%e9%85%8d%e7%bd%aeadd_header%e6%9c%80%e4%bd%b3%e5%ae%9e%e8%b7%b5.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Sun, 14 Apr 2024 11:19:45 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=18369</guid>

					<description><![CDATA[nginx的header安全配置最佳实践]]></description>
		
		
		
			</item>
		<item>
		<title>如何隐藏去掉nginx的版本号信息</title>
		<link>https://moneyslow.com/%e5%a6%82%e4%bd%95%e9%9a%90%e8%97%8f%e5%8e%bb%e6%8e%89nginx%e7%9a%84%e7%89%88%e6%9c%ac%e5%8f%b7%e4%bf%a1%e6%81%af.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Thu, 25 Jan 2024 02:51:28 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=17575</guid>

					<description><![CDATA[本文讨论nginx安全性，去掉版本号信息]]></description>
		
		
		
			</item>
		<item>
		<title>通过IPv4访问nginx服务,代理后端的IPv6服务</title>
		<link>https://moneyslow.com/%e9%80%9a%e8%bf%87ipv4%e8%ae%bf%e9%97%aenginx%e6%9c%8d%e5%8a%a1%e4%bb%a3%e7%90%86%e5%90%8e%e7%ab%af%e7%9a%84ipv6%e6%9c%8d%e5%8a%a1.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Thu, 18 Jan 2024 07:59:11 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=17503</guid>

					<description><![CDATA[本文讨论ipv4代理ipv6的nginx配置]]></description>
		
		
		
			</item>
		<item>
		<title>Nginx简明教程</title>
		<link>https://moneyslow.com/nginx%e7%ae%80%e6%98%8e%e6%95%99%e7%a8%8b.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Wed, 06 Dec 2023 08:43:39 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=17102</guid>

					<description><![CDATA[什么是 NGINX NGINX是一个免费的、开源的、高性能的 HTTP 服务器和反向代理，以及一个 IMAP/POP3 代理服务器。 NGINX以其高性能、稳定性、丰富的功能集、简单的配置和低资源消耗而闻名。 NGINX 是为解决C10K&#160;问题而编写的少数服务器之一。与传统服务器不同，NGINX 不依赖于线程来处理请求。相反，它使用更加可扩展的事件驱动（异步）架构。这种架构在负载下使用小的但更重要的是可预测的内存量。即使您不希望处理数千个并发请求，您仍然可以从 NGINX 的高性能和小内存中获益。 NGINX 在各个方向扩展：从最小的 VPS 一直到大型服务器集群。 控制语句 NGINX 启动后，有一个主进程（master process）和一个或多个工作进程（worker process），主进程的作用主要是读入和检查NGINX的配置信息，以及维护工作进程；工作进程才是真正处理客户端请求的进程。具体要启动多少个工作进程，可以在 NGINX 的配置文件nginx.conf中通过worker_processes指令指定。 可以通过以下这些命令来控制 NGINX： nginx -s [ stop &#124; quit &#124; reopen &#124; reload ] 其中： nginx -s stop： 强制停止NGINX，不管工作进程当前是否正在处理用户请求，都会立即退出。nginx -s quit：“优雅地”退出NGINX，执行这个命令后，工作进程会将当前正在处理的请求处理完毕后，再退出。nginx -s reload：重载配置信息。当NGINX的配置文件改变之后，同过执行这个命令，使更改的配置信息生效，而无需重新启动nginx.nginx -s reopen：重新打开日志文件。 配置服务器名称：服务器名称是用server_name指令来定义的，并且它决定了哪一个server块将用来处理给定的请求。可以使用精确名称、通配符、正则表达式来定义服务器名称。 当寻找一个虚拟服务器的名字，如果指定的名称匹配多个变体，例如，通配符和正则表达式都匹配，将会按照以下的顺序选择第一个匹配的变体： 精确名称 以星号（）开头的最长的通配符，例如“.example.org” 以星号（）结尾的最长的通配符，例如“mail.” 第一个匹配的正则表达式（根据在配置文件中出现的顺序） 配置 [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>nginx安全配置文件最佳实践</title>
		<link>https://moneyslow.com/nginx%e5%ae%89%e5%85%a8%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e6%9c%80%e4%bd%b3%e5%ae%9e%e8%b7%b5.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Mon, 27 Nov 2023 00:49:23 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=16976</guid>

					<description><![CDATA[Nginx是一个很牛逼的web server 服务器。与传统服务器不同，Nginx 不依赖线程来处理请求。 相反，它使用更具可扩展性的事件驱动（异步）架构。 Nginx 为多个高流量网站提供支持，例如 WordPress、Hulu、Github 和 SourceForge。 一、打开SELinux（设置正确的 SE Linux 布尔值加强安全），这个最安全，最变态，以至于可能会对你的开发调试带来麻烦，适用于不怕麻烦的高级运维安全人员。使用下面的命令： 请查看设置为“on”的设置，如果它们不适用于你的设置，请借助setsebool命令将其更改为“off”。 二、挂载磁盘的目录权限最小化（noexec, nodev ， nosetuid） 挂载的目录文件在/etc/fstab这个里面配置，要设置成这样： 三、加强/etc/sysctl.conf内核参数的安全控制，以下是一个标准安全的例子，你可以直接用： 四、去掉不需要的nginx 模块，比如，去掉ssi这个模块： 五、安装编译nginx的时候，去掉nginx的版本信息 编辑 src/http/ngx_http_header_filter_module.c 找到下面两行： 替换为： 然后继续编译安装就可以了。另外，可以在nginx配置文件中加入 server_tokens off 比如下面的例子： 六、在操作系统上安装mod_security来加强安全yum install mod_security，这个以后慢慢展开讲解。 七、安装自带selinux功能的nginx 八、利用iptables防火墙，下面是一个例子： 规则（进来的80，可以ping，出去只允许123和25）Incoming HTTP (TCP port 80) requestsIncoming ICMP ping requestsOutgoing ntp (port 123) requestsOutgoing smtp (TCP port 25) requests [&#8230;]]]></description>
		
		
		
			</item>
	</channel>
</rss>
