<?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%E6%9D%83%E9%99%90%E8%AE%BE%E7%BD%AE/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多站点虚拟主机实现单独启动停止php-fpm、单独控制权限设置</title>
		<link>https://www.osyunwei.com/archives/3743.html</link>
		<comments>https://www.osyunwei.com/archives/3743.html#comments</comments>
		<pubDate>Tue, 01 May 2012 05:24:36 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LNMP]]></category>
		<category><![CDATA[Nginx权限设置]]></category>
		<category><![CDATA[nginx虚拟主机]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=3743</guid>
		<description><![CDATA[说明： 站点1：bbs.osyunwei.com  程序所在目录/data/osyunwei/bbs 站点2：sns.osyunwei.com  程序所在目录/data/osyunwei/sns 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 相关配置文件目录： nginx主配置文件：/usr/local/nginx/conf/nginx.conf php安装目录：/usr/local/php5/ 站点1虚拟主机配置配置文件：/usr/local/nginx/conf/vhost/bbs.conf 站点2虚拟主机配置配置文件：/usr/local/nginx/conf/vhost/sns.conf 实现目的： 1、可以对站点1和站点2单独启动、停止php-fpm 2、站点1和站点2的php运行权限相互隔离，不能跨目录浏览，即站点1内的php木马不能访问站点2中的内容，      同理，站2内的php木马不能访问站点1中的内容。 实现方法： 一、为每个站点创建php-fpm.pid文件 cd /usr/local/php5/var/run touch php-fpm-bbs.pid touch php-fpm-sns.pid 二、为每个站点创建php-fpm.conf文件 cd /usr/local/php5/etc/ cp php-fpm.conf  php-fpm-bbs.conf cp php-fpm.conf  php-fpm-sns.conf 三、为每个站点建立php-cgi.sock文件 touch /tmp/php-cgi-bbs.sock  #建立php-cgi.sock文件 chown www.www /tmp/php-cgi-bbs.sock  #设置文件所有者为www（必须与nginx的用户一致） touch /tmp/php-cgi-sns.sock chown www.www /tmp/php-cgi-sns.sock 四、编辑相关文件 vi  /usr/local/php5/etc/php-fpm-bbs.conf pid = run/php-fpm-bbs.pid listen =/tmp/php-cgi-bbs.sock; [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/3743.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/3743.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
