码迷,mamicode.com
首页 > Web开发 > 详细

build your own website 1 -- how to install Apache Server

时间:2018-02-18 16:23:06      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:blank   bz2   cal   roo   sys   pack   from   page   available   

Operating System: Ubuntu 16.04

Web Server ?  most often used Web Server software is freely available Apache Server. Download Apache for free here ? https://httpd.apache.org/download.cgi#apache24

Unpack  httpd-2.4.29.tar.bz2 to ~/Downloads/httpd-2.4.29

Download apr-1.6.3.tar.bz2 and apr-util-1.6.1.tar.bz2 from http://apr.apache.org/download.cgi and unpack them to ~/Downloads/httpd-2.4.29/srclib/apr and ~/Downloads/httpd-2.4.29/srclib/apr-util respectively.

Install Apache using the commands below

./configure --prefix=/usr/local/apache2 --with-included-apr=true
make
make install

The installation takes several minutes. After this, you can start Apache server using

/usr/local/apache2/bin/apachectl start

It will warn you that

AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName‘ directive globally to suppress this message

This is a friendly warning and not an error. You can launch a browser and visit http://127.0.1.1 and a simple webpage saying "It works!" appears. The default document root is /usr/local/apache2/htdocs/ where we can put an hello_world.html and this html file‘s address is http://127.0.1.1/hello_world.html

If you want to turn off the server, run command

/usr/local/apache2/bin/apachectl stop

  The same warning appears

 

build your own website 1 -- how to install Apache Server

标签:blank   bz2   cal   roo   sys   pack   from   page   available   

原文地址:https://www.cnblogs.com/cxxszz/p/8452839.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!