1/12/2009

快速在Ubuntu 8.10 安装 lamp开发环境

在日常开发中,我们主要使用LAMP,Ubuntu提供了简单的,快速的配置该服务器环境的方法,步骤如下:

1 使用tasksel安装LAMP套件

sudo tasksel install lamp-server

2 基于ZF的开发要使用rewrite 模块,所以在终端中执行

sudo a2enmod rewrite

指令后,即启用了 Mod_rewrite 模块。

3 配置虚拟目录位置(修改红色部分)




<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /home/edwin/Zend/workspaces/DefaultWorkspace/Member-shouxi/Public
<directory>
Options FollowSymLinks
AllowOverride None
</directory>
<directory home/edwin/zend/workspaces/defaultworkspace/shouxi/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</directory>

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

ErrorLog /var/log/apache2/error.log

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

CustomLog /var/log/apache2/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>


4 重启apache 即可


No comments: