您的位置:首页 > 运维架构 > Apache

ubuntu11.04 apache的安装与配置

2012-11-14 11:06 232 查看
http://blog.sina.com.cn/s/blog_5c5a07bc0100z0eh.html

1.打开终端 输入 sudo apt-get install apache2

2.重起Apache 在终端中输入

sudo service apache2 restart 或者sudo /etc/init.d/apache2 restart

3.设置字符编码

etc/apache2/conf.d/charset 找到#AddDefaultCharsetUTF-8 前面的#去掉 使用UTF-8编码

4.设置根目录

etc/apache2/sites-available/default 需要使用root权限在终端下用VI或者其他编辑器打开修改

到此 Apache安装成功 访问http://127.0.0.1 会看到以下字样

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: