ubuntu11.04 apache的安装与配置

来源:互联网 发布:阿里云课堂 编辑:程序博客网 时间:2024/04/30 08:08

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.


原创粉丝点击