欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

centos5.5下源碼安裝apache

1、查看系統(tǒng)是否安裝Apache:

創(chuàng)新互聯(lián)公司專注于衡水網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供衡水營銷型網(wǎng)站建設(shè),衡水網(wǎng)站制作、衡水網(wǎng)頁設(shè)計、衡水網(wǎng)站官網(wǎng)定制、成都微信小程序服務(wù),打造衡水網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供衡水網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。

rpm -qa|grep httpd

有則卸載

yum remove httpd* -y

rpm -e --allmatches --nodeps httpd-2.2.3-83.el5.centos

2、源碼安裝apache

安裝apr

tar zxvf apr-1.5.0.tar.gz

cd apr-1.5.0

mkdir -p /usr/local/apr

./configure --prefix=/usr/local/apr

make

make install

安裝apr-util

tar zxvf apr-util-1.5.3.tar.gz

cd apr-util-1.5.3

mkdir -p /usr/local/apr-util-1.5.3

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config

make

make install

安裝pcre

unzip -o pcre-8.34.zip

cd pcre-8.34

mkdir -p /usr/local/pcre

./configure --prefix=/usr/local/pcre

make

make install

安裝openssl

tar zxvf openssl-1.0.1.tar.gz

cd openssl-1.0.1

mkdir -p /usr/local/openssl-1.0.1

./configure --prefix=/usr/local/openssl-1.0.1

make

make install

安裝apache

tar zxvf httpd-2.4.7.tar.gz

cd httpd-2.4.7

mkdir -p /usr/local/apache

./configure --prefix=/usr/local/apache --enable-modules=all --enable-mods-shared=all --enable-dav --enable-dav-fs --enable-so --with-mpm=prefork --with-ssl=/usr/local/openssl --with-apxs=/usr/local/apache/bin/apxs

--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre

make

make install

配置http服務(wù)器

首先測試一下服務(wù)器是否可以正常訪問,命令如下:

cd /usr/local/apache/bin

./apachectl start

然后在瀏覽器里輸入http://運行apache的ip地址

出現(xiàn)It Works,表示成功。

==============================apache的vhost配置=====================================

一、修改http.conf,使用httpd-vhosts.conf

# Virtual hosts

Include conf/extra/httpd-vhosts.conf

二、在httpd-vhosts.conf中配置站點

apache-2.2.x配置虛擬機的內(nèi)容:

NameVirtualHost 192.168.10.81:80

ServerAdmin rocdk890@gmail.com

directoryIndex index.html index.php index.htm index.shtml login.php

ServerName 192.168.10.81

DocumentRoot /var/www/vhosts/wwwroot

Options -Indexes

AllowOverride All

Order allow,deny

Allow from all

==================================

apache-2.4.x配置虛擬機的內(nèi)容:

ServerAdmin rocdk890@gmail.com

directoryIndex index.html index.php index.htm index.shtml login.php

ServerName 192.168.10.81

DocumentRoot /var/www/vhosts/wwwroot

Options -Indexes

AllowOverride All

Require all granted

可以看到apache-2.4.x把NameVirtualHost給取消,現(xiàn)在配置虛擬主機不需要再配置NameVirtualHost了.

刪除了 Order deny,allow 和 Order allow,deny

把 Deny from all 替換成了 Require all denied

把Allow from all 替換成了 Require all granted

然后還把 Allow from 192.168.10.21 這樣的語句給替換成了 Require host 192.168.10.21

三、瀏覽器綁定host即可

本文題目:centos5.5下源碼安裝apache
分享路徑:http://chinadenli.net/article32/cpohsc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標簽優(yōu)化、網(wǎng)站設(shè)計網(wǎng)站設(shè)計公司、手機網(wǎng)站建設(shè)企業(yè)建站、小程序開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)