Ubuntu下配置Apache2虚拟主机

Category : Linux

在安装完apache2和php后,我们需要对apache2进行一些配置。
进入/etc/apache2/目录,修改ports.conf,加入要监听的端口。
使用cp /mods-available/rewrite.load /mods-enabled/,开启mod_rewrite模块。
进入/sites-enabled/修改000-default文件,加入虚拟主机信息:

<VirtualHost *:88>
 ServerAdmin webmaster@localhost
 DocumentRoot /home/icefox/phpmyadmin/
 <Directory />
  Options FollowSymLinks
  AllowOverride All
 </Directory>
 <Directory /home/icefox/phpmyadmin/>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Order allow,deny
  allow from all
 </Directory>
 ErrorLog /var/log/apache2/error.log
 LogLevel warn
 CustomLog /var/log/apache2/access.log combined
</VirtualHost>

使用sudo /etc/init.d/apache2 restart重启apache2即可完成设定。

Tags :  Apache2  Ubuntu  Linux 

Published by 2008-12-26 10:37:31 | Views : 329 | Comments : 45


Comments

puujffghyk said :

YSyPsO zjyxxylkcpba, [url=http://elzoyneovtej.com/]elzoyneovtej[/url], [link=http://nemdozjbhodd.com/]nemdozjbhodd[/link], http://uqeemqmpkjje.com/

Published by : 2009-10-24 16:44:03

Acciari said :

Cheap4Ferries has also introduced European Vehicle Breakdown Cover online. ambien ndtvl accutane %-DD propecia %[[

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

xxxxxx said :

ambien shvevl tramadol =-PP accutane %-P

Published by : 2009-11-05 19:55:23

Parejo said :

Have you been deprived of a steaming sack session because of this condition and you think you are losing your masculinity? ambien ocgg buy valium 09607 propecia 58339

Published by : 2009-11-06 00:22:19

Abbott said :

buy cialis 907834 accutane >:-[[

Published by : 2009-11-24 03:14:04

Violetta said :

accutane %] propecia 738

Published by : 2009-11-24 09:25:53

arialnormal said :

tramadol huby cialis 021

Published by : 2009-12-21 04:24:00

arialnormalg said :

levitra pnbnv tramadol %-[[ xanax 1605

Published by : 2009-12-21 04:54:17

ahtis_ausstellung said :

tramadol 1147 levitra %[[ prednisone 097096 nexium >:-O

Published by : 2010-01-14 03:58:21

copy said :

tramadol >:O ambien numijr prednisone aku accutane 245

Published by : 2010-01-14 05:57:33

 *(required)

 (won't be displayed)