<?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/%E6%9B%B4%E6%94%B9apache%E9%BB%98%E8%AE%A4%E7%9B%AE%E5%BD%95/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默认网站目录</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>
	</channel>
</rss>
