Fedora Core 10 下配置 Apache2

Category : Linux

由于家里没有Debian的安装盘,所以只好装上FC10来使用linux了.

装上fedora后,就开始配置我的lamp环境了,cd进/etc/apache2后发现,根本没有此目录,可是我的apache2服务器都开启了,怎么可能后不存在该目录呢.于是尝试用cd /etc/httpd来测试,结果还真让我给猜对了.Red hat系列的linux都把apache安装在httpd目录,而debian和ubuntu则是安装在apache2目录,名字稍有不同,进去后,发现配置文件也有很大的不同.

Debian下的目录设计一开始让人觉得有些匪夷所思,但是仔细想想会发现,这样的设置原来更人性化,它将配置文件分为几个目录,比如说,站点和虚拟主机的配置,就有2个目录,一个是sites-enable一个是sites-available,从名字上就可以看出来区别了,第一个是目前使用的,后面的是可以使用的.这里不再对debian的设置做更多的讲解了,本文主要讲Fedora下的配置.

Fedora下的apache2配置文件就一个,为/etc/httpd/conf/httpd.conf,打开此文件,将里面的User apache和Group apache改成自己的用户名,这样做就不用设置任何权限也可以打开自己的页面了(仅限开发用,做服务器的话不要这么改),如果要配置基于端口的虚拟服务器的话,先设置要监听的端口,比如说Listen 88,一个listen一行,然后设置虚拟服务器,配置信息如下:

<VirtualHost *:88>
	ServerAdmin webmaster@dummy-host.example.com
	DocumentRoot /home/kingheaven/phpmyadmin
	<Directory "/home/kingheaven/phpmyadmin">
		Options Indexes FollowSymLinks
		AllowOverride All
		Order allow,deny
		Allow from all
	</Directory>
</VirtualHost>

Tags :  Linux  Fedora 

Published by 2009-01-12 01:00:25 | Views : 312 | Comments : 60


Comments

ceshi ~ said :

不可以留言吗?

Published by : 2009-02-17 13:10:03

jxkbhzfl said :

PS7JbC gcihlyvutuam, [url=http://flhyaqqmepgq.com/]flhyaqqmepgq[/url], [link=http://ywuhuddksjyl.com/]ywuhuddksjyl[/link], http://ypfuhlligmlz.com/

Published by : 2009-10-24 16:46:05

Aahs said :

Most people suffer from mild to moderate acne and can use most over the counter medications or home remedies to help with these acne treatments. levitra 8-OOO tramadol sikhyr valium :O

Published by : 2009-11-05 08:46:58

paris said :

They believe that such kind of care involves applying remedies in large amounts as frequently as possible. valium =-(( buy accutane %-)) propecia puyoo

Published by : 2009-11-05 16:35:53

Eadbrect said :

ambien >:P valium 8-PPP accutane 5029

Published by : 2009-11-05 22:31:06

Abair said :

buy cialis vmevzf buy propecia 0573

Published by : 2009-11-24 04:07:08

Komatsu said :

buy accutane %-]] buy propecia nsm

Published by : 2009-11-24 12:13:28

ClubRed said :

levitra online wkjvoj tramadol rae

Published by : 2009-12-21 05:10:44

arialfettw said :

valium sorqxk levitra online =-] acomplia ckfro

Published by : 2009-12-21 05:42:22

formatvorlage20 said :

xanax 8PPP

Published by : 2010-01-12 06:24:12

 *(required)

 (won't be displayed)