Before You Begin
Apache is one of the most popular Web servers on the Web right now, and part of its
charm is that it's free. It also has a lot of features that make it very extensible
and useful for many different types of Web sites. It is a server that is used for
personal Web pages up to enterprise level sites.
This article will discuss how to install Apache on a Linux system. Before we start
you should be at least comfortable working in Linux - changing directories, using tar
and gunzip, and compiling with make (I'll discuss where to get binaries if you don't
want to mess with compiling your own). You should also have access to the root account
on the server machine.
Download Apache
I recommend downloading the latest stable release. At the time of this writing, that
was Apache 2.0. The best place to get Apache is from the
Apache HTTP Server download site
.
Download the sources appropriate to your system.
Binary releases
are available as well.
Extract the Files
Once you've downloaded the files you need to uncompress them and untarring:
tar xzvf httpd-2_0_NN.tar.gz
This creates a new directory under the current directory with the source files.
Configuring
Once you've got the files, you need to tell your machine where to find everything by
configuring the source files. The easiest way is to accept all the defaults and just
type:
./configure
Of course, most people don't want to accept just the default choices. The most important
option is the prefix= option. This specifies the directory where the Apache files
will be installed. You can also set specific environment variables and modules. Some
of the modules
I like to have installed are:
- mod_alias - to map different parts of the URL tree
- mod_include - to parse Server Side Includes
- mod_mime - to associate file extensions with its MIME-type
- mod_rewrite - to rewrite URLs on the fly
- mod_speling (sic) - to help your readers who might misspell URLs
- mod_ssl - to allow for strong cryptography using SSL
- mod_userdir - to allow system users to have their own Web page directories
Please keep in mind that these aren't all the modules I might install on a given system.
Read the details about the modules
to determine which ones you need.
Build
As with any source installation, you'll then need to build the installation:
make
make install
Customize
Assuming that there were no problems, you are ready to customize your Apache configuration.
This really just amounts to editing the httpd.conf file. This file is located in the
PREFIX/conf directory. I generally edit it with
vi
:
vi PREFIX/conf/httpd.conf
Note: you'll need to be root to edit this file.
Follow the instructions in this file to edit your configuration the way you want it.
More help is available on the
Apache Web site
.
Test Your Server
Open a Web browser on the same machine and type http://localhost/ in the address box.
You should see a page similar to the one in the partial screen shot above. Specifically,
it will say in big letters "Seeing this instead of the website you expected?" This is
good news, as it means your server installed correctly.
Start Editing/Uploading Pages
Once your server is up and running you can start posting pages. Have fun building
your Web site.
分享到:
相关推荐
Apache FTPServer是一款开源的FTP服务器软件,它是Apache MINA项目的一部分,用于构建高性能、可扩展的网络应用。这篇笔记主要围绕Apache FTPServer的使用、配置和相关开发进行讲解。 首先,Apache FTPServer提供了...
### 从头开始对Ubuntu进行优化教程的知识点详解 #### 一、Ubuntu系统概述与重要性 - **Ubuntu系统简介**:Ubuntu是一款基于Debian的Linux操作系统,以其易用性和强大的社区支持而闻名。它是目前最受欢迎的Linux发行...
从头开始机器学习之旅-机器学习
综上所述,Open-IM-Server是一个强大且灵活的即时通讯解决方案,它提供了一整套工具和框架,让开发者可以专注于构建自己的IM应用,而无需从头开始解决底层通信问题。通过学习和掌握Open-IM-Server,开发者能够构建出...
从头开始对ubuntu进行优化教程.rar
BERT_从头开始训练MASK_BERT_算法训练_优质项目实战
仅使用Python基础从头开始构建大型语言模型;从零开始逐步构建GLM4-Lama3-RWKV6,深入了解大型模型的原理.zip仅使用Python基础从头开始构建大型语言模型;从零开始逐步构建GLM4-Lama3-RWKV6,深入了解大型模型的原理...
万一系统出现问题或需要重新安装,有备份的PCRE库可以快速恢复,避免了从头开始下载和编译的时间成本。 总之,PCRE库是Apache HTTP Server不可或缺的一部分,它使得服务器能够处理复杂的URL规则,提供强大的文本...
教程名称:Photoshop从头学起课程目录:【】Photoshop从头学起第(1-10)【】Photoshop从头学起第(11-20)【】Photoshop从头学起第(21-30)【】Photoshop从头学起第(31-40)【】Photoshop从头学起第(41-50)【】Photoshop...
**重新处理** 是指当系统出现错误或需要回溯到某个特定状态时,能够从头开始或从某个检查点重新处理数据的能力。Flink 的重新处理能力非常强大,允许用户灵活地处理各种异常情况。 #### 九、案例分析与代码示例 - ...
本教程将指导您从头开始安装 Ubuntu 服务器,包括下载安装光盘、启动安装程序、选择语言和所在地区、设置键盘类型、加载组件、设置网络等步骤。 1. 获取 Ubuntu 服务器安装光盘 您可以从 Ubuntu 官方网站下载安装...
从头开始创建服务器 ansible-playbook --ask-vault-pass main.yml 更新服务器内部的软件包 ansible-playbook --ask-vault-pass update.yml 要在main.yml中使用的角色下存在写目录名称 - hosts: server user: "{{ ...
简单推理服务器 介绍 用于机器学习模型推理的简单多线程 TCP/IP 服务器的实现。 具体来说,以问答(QA)服务为例。 服务器设计为具有线程安全队列,其中所有推理请求都被保留,多个推理引擎工作线程将获得推理请求并...
这个项目旨在教你如何从零开始构建一个可启动的、可安装的Ubuntu Live系统,同时具备自动硬件检测和配置功能。这涉及到Linux系统的内核编译、ISO映像制作、UEFI和BIOS兼容性等多个关键知识点。 首先,我们来深入...
它是基于Java Servlet和JavaServer Pages (JSP) 技术的标准实现,由Apache软件基金会维护。Tomcat作为轻量级应用服务器,是开发和测试Java Web应用的理想选择,尤其适合小型到中型的应用。 在描述中提到,这个压缩...
cloud-image-ubuntu-from-scratch:此过程显示如何从头创建云映像Ubuntu,以在云环境(EC2,GCE,Azure,QEMU和VirtualBox)上运行
通过`Net::Server`,开发者可以快速地搭建高性能、可扩展的网络服务,而无需从头开始编写底层的网络通信代码。结合其他Perl模块,如`HTTP::Daemon`或`Net::FTP`,你可以构建复杂的互联网应用,如Web服务器、FTP...
League/OAuth2-Server是这个项目依赖的开源库,它是一个符合OAuth2.0标准的服务器实现。这个库提供了完整的OAuth2.0授权流程,包括认证、授权、令牌管理等核心功能。通过集成到Laravel,开发者可以轻松地在Laravel...
标题中的"Http.rar_C http server_c# http_http c#_http c++_http server"表明这是一个关于HTTP服务器的资源...通过阅读和分析这些源码,可以学习到如何从头开始构建一个简单的HTTP服务器,并了解如何处理并发请求。