日期:2014-05-17  浏览次数:20800 次

apache2的一些小问题
我用的是linux机器,ubuntu的。安装了最基本的php5,apache2,mysql
但是现在我的local里面还有个apache,这个是什么东西?老版的apache么?
我修改了apache2里面的000-default文件,让document root改成我想要的路径,但是无论怎么改,怎么重启apache,路径仍然是var/www。。。。。下面是我改的文件:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /home/cth/website_test
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/cth/website_test>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

  Alias /doc/ "/usr/share/doc/"
  <Directory "/usr/share/doc/">
  Options Indexes MultiViews FollowSymLinks
  AllowOverride None
  Order deny,allow
  Deny from all
  Allow from 127.0.0.0/255.0.0.0 ::1/128
  </Directory>

</VirtualHost>


------解决方案--------------------
我记得软件仓库里面的apache 的配置文件有 site-available 和 site-enabled. lz 注意区分。