<?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; Apache</title>
	<atom:link href="http://www.osyunwei.com/archives/tag/apache/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>Wed, 01 Apr 2026 08:27:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux下编译安装Apache并支持php</title>
		<link>https://www.osyunwei.com/archives/16731.html</link>
		<comments>https://www.osyunwei.com/archives/16731.html#comments</comments>
		<pubDate>Thu, 11 Sep 2025 08:52:51 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=16731</guid>
		<description><![CDATA[前置知识： Rocky Linux 10.x编译安装nginx-1.28.x+mysql-8.4.x+php-8.4.x https://www.osyunwei.com/archives/16714.html 安装包下载： 1、apache https://dlcdn.apache.org/httpd/httpd-2.4.65.tar.gz 2、apr（Apache库文件） https://dlcdn.apache.org//apr/apr-1.7.6.tar.gz 3、apr-util（Apache库文件） https://dlcdn.apache.org//apr/apr-util-1.6.3.tar.gz 4、apache支持php模块 https://dlcdn.apache.org/httpd/mod_fcgid/mod_fcgid-2.3.9.tar.gz 安装apache： 1、安装编译工具包 yum install gcc make apr-devel apr-util-devel pcre2-devel openssl-devel 2、安装apr cd /usr/local/src tar zxvf apr-1.7.6.tar.gz cd apr-1.7.6 ./configure --prefix=/usr/local/apr make -j$(nproc) make install 3、安装apr-util cd /usr/local/src tar zxvf apr-util-1.6.3.tar.gz cd apr-util-1.6.3 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr make -j$(nproc) make install ls /usr/local/apr-util/lib/libaprutil-1.so [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/16731.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/16731.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下apache虚拟主机配置多版本php同时运行</title>
		<link>https://www.osyunwei.com/archives/10174.html</link>
		<comments>https://www.osyunwei.com/archives/10174.html#comments</comments>
		<pubDate>Mon, 01 Jul 2019 05:16:31 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=10174</guid>
		<description><![CDATA[学习本教程须掌握： 1、Linux下指定版本编译安装LAMP https://www.osyunwei.com/archives/9224.html 2、Linux下Apache虚拟主机配置 https://www.osyunwei.com/archives/9232.html 3、CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3多版本全能环境 https://www.osyunwei.com/archives/10057.html 安装约定： Apache版本：2.2 Apache安装路径：/usr/local/apache Apache虚拟主机配置文件：/usr/local/apache/conf/vhost php版本：支持php5.2到最新的php7.3 php安装路径：/usr/local/php56      /usr/local/php73 开始配置： 1、安装Apache的mod_fcgid模块   #mod_fcgid模块可以实现Apache下多版本php同时运行 cd  /usr/local/src wget   https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/mod_fcgid/mod_fcgid-2.3.9.tar.gz   #下载 tar -zxvf mod_fcgid-2.3.9.tar.gz cd mod_fcgid-2.3.9 APXS=/usr/local/apache/bin/apxs      ./configure.apxs make make install 2、修改apache配置文件 cp  /usr/local/apache/conf/httpd.conf   /usr/local/apache/conf/httpd.conf-bak   #备份 vi  /usr/local/apache/conf/httpd.conf   #编辑 #在Group apache下面一行添加如下代码，如果配置文件有就不用重复添加。 LoadModule fcgid_module modules/mod_fcgid.so [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/10174.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/10174.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下Apache虚拟主机配置https证书</title>
		<link>https://www.osyunwei.com/archives/10203.html</link>
		<comments>https://www.osyunwei.com/archives/10203.html#comments</comments>
		<pubDate>Wed, 01 May 2019 13:02:27 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[https]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=10203</guid>
		<description><![CDATA[学习本教程须掌握： 1、Linux下指定版本编译安装LAMP https://www.osyunwei.com/archives/9224.html 2、Linux下Apache虚拟主机配置 https://www.osyunwei.com/archives/9232.html 安装约定： Apache版本：2.2    #注意2.4和2.2版本某些参数的写法不一样 Apache安装路径：/usr/local/apache Apache虚拟主机配置文件：/usr/local/apache/conf/vhost https证书存放路径：/usr/local/apache/cert/ 开始配置： 1、确保Apache安装有OpenSSL模块 编译安装需要有参数：--enable-ssl 2、修改apache配置文件 vi  /usr/local/apache/conf/httpd.conf  #编辑，找到如下参数并去掉前面的注释，启用参数 LoadModule ssl_module modules/mod_ssl.so Include conf/extra/httpd-ssl.conf :wq!  #保存退出 3、修改httpd-ssl.conf配置 cp  /usr/local/apache/conf/extra/httpd-ssl.conf   /usr/local/apache/conf/extra/httpd-ssl.conf-bak   #备份 vi  /usr/local/apache/conf/extra/httpd-ssl.conf  #编辑添加以下内容 Listen 443 NameVirtualHost *:443   #必须加上这一句，否则只能识别到第一个虚拟主机的证书。 #SSLStrictSNIVHostCheck off AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL  #修改加密套件 SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4 SSLHonorCipherOrder on SSLProtocol TLSv1 TLSv1.1 [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/10203.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/10203.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux服务器安全狗Apache版本安装</title>
		<link>https://www.osyunwei.com/archives/9654.html</link>
		<comments>https://www.osyunwei.com/archives/9654.html#comments</comments>
		<pubDate>Thu, 22 Sep 2016 03:14:00 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Liunx]]></category>
		<category><![CDATA[安全狗]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9654</guid>
		<description><![CDATA[说明： 在CentOS下使用yum命令默认安装的httpd版本，直接安装服务器安全狗Apache版本没有问题。 但是，如果Apache是自定义路径并且增加模块编译安装的，这个时候默认安装服务器安全狗Apache版本会报错，提示安装失败。 httpd-2.2.31 php-5.2.17 注意：咨询安全狗官方人员得到的回复是php版本太低，高版本的php直接安装不会有问题，这里是php-5.2.17的版本，其他的版本没试过。 解决办法： 1、下载安全狗 cd /usr/local/src wget  http://safedog.cn/safedog_linux64.tar.gz   #下载安全狗64位版本 tar  zxvf  safedog_linux64.tar.gz  #解压 cd   /usr/local/src/safedog_linux64/install_files/safedogwz_linux64  #进入目录 vi  install.sh  #编辑修改，注释掉function find_apache()和function clean_install()这两个模块 #find apache #function find_apache() #{ #       for progname in httpd apache2 apached #       do #               #find apache service #               testcmd="service "$progname" status" #               $testcmd&#62;/dev/null 2&#62;&#38;1 #               ret=$? #               if [ [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9654.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9654.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下Apache虚拟主机配置</title>
		<link>https://www.osyunwei.com/archives/9232.html</link>
		<comments>https://www.osyunwei.com/archives/9232.html#comments</comments>
		<pubDate>Mon, 24 Aug 2015 16:08:35 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[虚拟主机]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9232</guid>
		<description><![CDATA[说明： Apache版本：httpd-2.2.31 Apache安装目录：/usr/local/apache 目的： 配置Apache虚拟主机 具体操作： 1、修改Apache主配置文件 cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf-bak #修改之前先备份 vi /usr/local/apache/conf/httpd.conf #修改 找到# Virtual hosts这一行，添加以下两行： Include conf/error/*.conf Include conf/vhost/*.conf 找到# Server-pool management (MPM specific)这一行，取消下面一行的注释 Include conf/extra/httpd-mpm.conf 找到#ErrorDocument 404 /404.html这一行，取消前面的注释 ErrorDocument 404 /404.html #404.html需要创建好放在网站根目录下面 找到# ErrorLog: The location of the error log file.这一段，添加 ErrorLog "/usr/local/apache/logs/error_log" #Apache错误日志记录，需要创建好目录文件 #ErrorLog "/dev/null" #表示不记录Apache错误日志 LogLevel crit #日志级别，致命情况才记录 找到# The [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9232.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9232.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下指定版本编译安装LAMP</title>
		<link>https://www.osyunwei.com/archives/9224.html</link>
		<comments>https://www.osyunwei.com/archives/9224.html#comments</comments>
		<pubDate>Mon, 24 Aug 2015 08:41:29 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9224</guid>
		<description><![CDATA[说明： 操作系统：CentOS 6.5 64位 需求： 编译安装LAMP运行环境 各软件版本如下： MySQL：mysql-5.1.73 Apache：httpd-2.2.31 PHP：php-5.2.17 具体操作： 准备篇 一、配置防火墙，开启80端口、3306端口 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9224.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9224.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下SVN服务器同时支持Apache的http和svnserve独立服务器两种模式且使用相同的访问权限账号</title>
		<link>https://www.osyunwei.com/archives/9145.html</link>
		<comments>https://www.osyunwei.com/archives/9145.html#comments</comments>
		<pubDate>Sat, 27 Jun 2015 11:40:22 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[SVN]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[svnserve]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9145</guid>
		<description><![CDATA[说明： 服务器操作系统：CentOS 6.x 服务器IP：192.168.21.134 实现目的： 1、在服务器上安装配置SVN服务； 2、配置SVN服务同时支持Apache的http和svnserve独立服务器两种模式访问； 3、Apache的http和svnserve独立服务器两种模式使用相同的访问权限账号。 具体操作： 一、关闭SELINUX vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存退出 setenforce 0 #使配置立即生效 二、开启防火墙端口 系统运维  www.osyunwei.com  温馨提醒：系统运维原创内容©版权所有,转载请注明出处及原文链接 基于Apache的http模式，默认端口为80 基于svnserve的独立服务器模式，默认端口为3690 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9145.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9145.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 5.11安装配置LAMP服务器(Apache+PHP5+MySQL)</title>
		<link>https://www.osyunwei.com/archives/8880.html</link>
		<comments>https://www.osyunwei.com/archives/8880.html#comments</comments>
		<pubDate>Tue, 16 Dec 2014 06:28:01 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=8880</guid>
		<description><![CDATA[准备篇： CentOS 5.x系统安装配置图解教程 http://www.osyunwei.com/archives/7002.html 1、配置防火墙，开启80端口、3306端口 vi /etc/sysconfig/iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT :wq! #保存退出 添加好规则后的防火墙配置文件如下图所示： /etc/init.d/iptables restart #重启防火墙使配置生效 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/8880.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/8880.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache虚拟主机配置</title>
		<link>https://www.osyunwei.com/archives/4065.html</link>
		<comments>https://www.osyunwei.com/archives/4065.html#comments</comments>
		<pubDate>Sun, 27 May 2012 08:49:15 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[虚拟主机]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=4065</guid>
		<description><![CDATA[配置之前先把域名解析到服务器IP地址上 服务器系统：CentOS 6.2 站点1：bbs.osyunwei.com  程序所在目录/var/www/html/bbs 站点2：sns.osyunwei.com  程序所在目录/var/www/html/sns chown apache.apache -R /var/www/html   #设置目录所有者 chmod 700  /var/www/html   -R  #设置目录权限 说明：修改之前先备份原来的配置文件 一、Apache配置 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 cp /etc/httpd/conf/httpd.conf  /etc/httpd/conf/httpd.confbak   #修改之前先备份原文件 vi    /etc/httpd/conf/httpd.conf   #编辑配置文件 ServerTokens OS　    在44行  修改为：ServerTokens Prod （在出现错误页的时候不显示服务器操作系统的名称） ServerSignature On　 在536行 修改为：ServerSignature Off （在错误页中不显示Apache的版本） Options Indexes FollowSymLinks　 在331行 修改为：Options Includes ExecCGI FollowSymLinks（允许服务器执行CGI及SSI，禁止列出目录） #AddHandler cgi-script .cgi　在796行 修改为：AddHandler cgi-script .cgi [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/4065.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/4065.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 6.2安装配置LAMP服务器(Apache+PHP5+MySQL)</title>
		<link>https://www.osyunwei.com/archives/1566.html</link>
		<comments>https://www.osyunwei.com/archives/1566.html#comments</comments>
		<pubDate>Wed, 21 Dec 2011 05:42:51 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS 6.2]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=1566</guid>
		<description><![CDATA[准备篇： 1、配置防火墙，开启80端口、3306端口    vi /etc/sysconfig/iptables    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT（允许80端口通过防火墙）    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT（允许3306端口通过防火墙） 特别提示：很多网友把这两条规则添加到防火墙配置的最后一行，导致防火墙启动失败，正确的应该是添加到默认的22端口这条规则的下面 添加好之后防火墙规则如下所示： ######################################################### # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/1566.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/1566.html/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Linux系统下禁止apache空主机头</title>
		<link>https://www.osyunwei.com/archives/822.html</link>
		<comments>https://www.osyunwei.com/archives/822.html#comments</comments>
		<pubDate>Fri, 04 Nov 2011 08:04:44 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[禁止apache空主机头]]></category>

		<guid isPermaLink="false">http://w66416.s75.chinaccnet.cn/?p=822</guid>
		<description><![CDATA[引言：为了防止域名解析恶意指向，我们需要禁止apache默认的空主机头，操作如下 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 vi /etc/httpd/conf/httpd.conf     #编辑配置文件，在你的站点配置之前再增加一个站点（红色字体部分是我们要增加的，蓝色字体部分代表你正在使用的站点配置） NameVirtualHost *         &#60;VirtualHost *:80&#62;     ServerAdmin yourmail@mail.com     DocumentRoot /error     ServerName abc.com &#60;/VirtualHost&#62; 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 &#60;VirtualHost *:80&#62;     ServerAdmin yourmail@mail.com     DocumentRoot "你的站点路径"     ServerName yourWebsite.com     ServerAlias *.yourWebsite.com &#60;/VirtualHost&#62; &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/822.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » Linux系统下禁止apache空主机头<p><a rel="bookmark" href="https://www.osyunwei.com/archives/822.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/822.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<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>
		<item>
		<title>CentOS  Linux系统下更改Apache默认网站目录</title>
		<link>https://www.osyunwei.com/archives/789.html</link>
		<comments>https://www.osyunwei.com/archives/789.html#comments</comments>
		<pubDate>Thu, 03 Nov 2011 14:10:32 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[更改Apache默认目录]]></category>

		<guid isPermaLink="false">http://w66416.s75.chinaccnet.cn/?p=789</guid>
		<description><![CDATA[引言： Apache默认的网站目录是在/var/www/html，我们现在要把网站目录更改到/home/wwwroot/web1/htdocs，操作如下 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 准备工作： 创建目录： cd /home mkdir wwwroot cd wwwroot mkdir web1 cd web1 mkdir htdocs touch index.php 操作步骤： 1、vi /etc/httpd/conf/httpd.conf    找到 DocumentRoot "/var/www/html" 这一段     #apache的根目录    把/var/www/html 这个目录改为/home/wwwroot/web1/htdocs    再找到 &#60;Directory "/var/www/html"&#62;   #定义apache /var/www/html这个区域    把 /var/www/html改成/home/wwwroot/web1/htdocs    这样我们就把apahce的默认路径改掉了    service httpd restart  #重启Apache服务器 2、访问localhost的时候，会发现访问拒绝，这是为什么呢？ 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 主要是因为你的/home/wwwroot/web1/htdocs的权限是750，apache这个用户没有权限访问，你需要更改掉权限，可以这样改    [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/789.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/789.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS Linux系统下apache日志文件设置（每天单独生成一个日志文件）</title>
		<link>https://www.osyunwei.com/archives/777.html</link>
		<comments>https://www.osyunwei.com/archives/777.html#comments</comments>
		<pubDate>Thu, 03 Nov 2011 13:49:06 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache日志]]></category>

		<guid isPermaLink="false">http://w66416.s75.chinaccnet.cn/?p=777</guid>
		<description><![CDATA[引言： Apache默认安装下，日志记录只有一个文件，时间久了之后，这个文件会变的很大，管理员要想查看分析日志，光打开日志就要花费很长时间，甚至还会影响服务器运行。 下面教大家设置apache，让服务器每天单独生成一个日志文件，这样管理、分析日志会方便很多。 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 ##################################################################################### vi /etc/httpd/conf/httpd.conf  #编辑文件 #ErrorLog logs/error_log  #注释此行，添加下面这行 ErrorLog "&#124;rotatelogs /var/log/httpd/error_log%Y%m%d.log 86400 480"  #每天单独生成一个日志文件 #CustomLog logs/access_log common  #注释此行，添加下面这行 CustomLog "&#124;rotatelogs /var/log/httpd/access_log%Y%m%d.log 86400 480" common  #每天单独生成一个日志文件 ###################################################################################### 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 扩展：如果想禁止Apache日志文件，可以设置如下 ErrorLog /dev/null  #禁用错误日志 CustomLog /dev/null common  #禁用访问日志 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/777.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » CentOS Linux系统下apache日志文件设置（每天单独生成一个日志文件）<p><a rel="bookmark" href="https://www.osyunwei.com/archives/777.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/777.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
