<?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; 防止php木马</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/%E9%98%B2%E6%AD%A2php%E6%9C%A8%E9%A9%AC/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>CentOS Linux系统下Apache防止php木马跨站设置</title>
		<link>https://www.osyunwei.com/archives/795.html</link>
		<comments>https://www.osyunwei.com/archives/795.html#comments</comments>
		<pubDate>Thu, 03 Nov 2011 14:26:37 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[防止php木马]]></category>

		<guid isPermaLink="false">http://w66416.s75.chinaccnet.cn/?p=795</guid>
		<description><![CDATA[引言： 在Apache服务器中，切忌一定要在虚拟主机配置文件中添加以下代码，否则PHP木马脚本可以浏览你服务器上的任意文件，这意味着你的服务器很快会被攻破。 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 代码如下： php_admin_value open_basedir "/usr/local/apache/htdocs/www/:/tmp/" 注意：把/usr/local/apache/htdocs/www/替换成你自己的网站目录 例如： 编辑虚拟主机配置文件 vi /etc/httpd/conf.d/vhost.conf 在你的网站配置中添加下面的代码 &#60;VirtualHost *:80&#62; php_admin_value open_basedir "/usr/local/apache/htdocs/www/:/tmp/" &#60;/VirtualHost&#62; 注意：    因为/etc/httpd/conf.d/vhost.conf中设置了open_basedir之后, 虚拟用户就不会再自动继承php.ini 中的open_basedir设置值了,这就难以达到灵活的配置措施, 所以建议您不要在/etc/httpd/conf.d/vhost.conf 中设置此项限制。 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 例如,可以在php.ini中设置open_basedir = .:/tmp/ 这个设置表示允许访问当前目录(即PHP脚本文件所在之目录)和/tmp/目录，有效防止php木马跨站运行。 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/795.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » CentOS Linux系统下Apache防止php木马跨站设置<p><a rel="bookmark" href="https://www.osyunwei.com/archives/795.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/795.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
