第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

windows linux如何安裝多個(gè)apache?

windows linux如何安裝多個(gè)apache?

www說 2019-02-06 15:02:56
windows linux如何安裝多個(gè)apache
查看完整描述

2 回答

?
慕俠2389804

TA貢獻(xiàn)1719條經(jīng)驗(yàn) 獲得超6個(gè)贊

Windows下安裝多個(gè)Apache服務(wù):

1.安裝好Apache以后,可以在瀏覽器中輸入http://localhost測(cè)試;

2.更改第一個(gè)站點(diǎn)的根目錄:在文件Apache2.2\conf\httpd.conf中查找 DocumentRoot 屬性,將后面的路徑改為你的主站點(diǎn)的路徑,如:D:\www\web1

3.為第二個(gè)Apache服務(wù)建立配置文件:復(fù)制并重命名httpd.conf為web2.conf(舉個(gè)例子而已,也可以叫my.conf等等),修改web2.conf中的Listen 8080(原來為80)、ServerName localhost:8080(原來為80)、DocumentRoot "D:/www/web2"(原來為web1)

3.添加第二個(gè)Apache服務(wù):Apache安裝目錄的bin子目錄下,使用如下命令將Apache安裝為Windows NT服務(wù):httpd.exe -k install -n "服務(wù)名" -f "d:\apache2.2\conf\web2.conf"

Linux系統(tǒng)下安裝多個(gè)Apache服務(wù):

1.完整安裝一個(gè)apache到/usr/server/apache

12345678910cp /usr/server/apache /usr/server/apache1#復(fù)制其中一個(gè)Apache配置文件#修改/usr/server/apache/conf/httpd.conf 監(jiān)聽192.168.1.100#修改/usr/server/apache1/conf/httpd.conf 監(jiān)聽192.168.1.101 ServerRoot為/usr/server/apache1vi /usr/server/apache1/bin/apachectl#將里面所有的路徑為apache的修改為apache1vi /usr/server/apache1/bin/envvars#將里面所有的路徑為apache的修改為apache1vi /usr/server/apache1/bin/envvars-std#將里面所有的路徑為apache的修改為apache1

2.創(chuàng)建系統(tǒng)啟動(dòng)文件

12345678910111213141516171819202122232425262728293031323334vi /usr/server/apache1/bin/apache.sysvinit#!/bin/sh## This is a sample /etc/init.d file for apache## chkconfig: 2345 80 30# description: apache1 - WWW server prefix=/usr/server/apache1exec_prefix=/usr/server/apache1bindir=${exec_prefix}/binsbindir=${exec_prefix}/sbin case "$1" instart)    echo -n "Starting apache1 WWW server:"    /usr/server/apache1/bin/apachectl -f /usr/server/apache1/conf/httpd.conf -k start    echo -n ""    ;;stop)echo -n "Stopping apache1 WWW server:"    /usr/server/apache1/bin/apachectl -f /usr/server/apache1/conf/httpd.conf -k stop    echo -n ""    ;;restart)    $0 stop    $0 start;;esacexit 0 cp /usr/server/apache1/bin/apache.sysvinit /etc/rc.d/init.d/httpd1chmod 755 /etc/rc.d/init.d/httpd1chkconfig --add httpd1

3.測(cè)試Apache服務(wù)

123/etc/init.d/httpd1 startnetstat -ant |grep LISTEN/etc/init.d/httpd1 stop



查看完整回答
反對(duì) 回復(fù) 2019-03-02
  • 2 回答
  • 0 關(guān)注
  • 875 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)