Linux下安装多个apache
来源:互联网 发布:文明6 mac 编辑:程序博客网 时间:2024/06/05 15:28
完整安装一个apache到/usr/server/apache
复制/usr/server/apache到/usr/server/apache1
修改/usr/server/apache/conf/httpd.conf 监听192.168.1.100
修改/usr/server/apache1/conf/httpd.conf 监听192.168.1.101 ServerRoot 为/usr/server/apache1
vi /usr/server/apache1/bin/apachectl
将里面所有的路径为apache的修改为apache1
vi /usr/server/apache1/bin/envvars
将里面所有的路径为apache的修改为apache1
vi /usr/server/apache1/bin/envvars-std
将里面所有的路径为apache的修改为apache1
创建系统启动文件
vi /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/apache1
exec_prefix=/usr/server/apache1
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
case "$1" in
start)
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
;;
esac
exit 0
==============================================================================
cp /usr/server/apache1/bin/apache.sysvinit /etc/rc.d/init.d/httpd1
chmod 755 /etc/rc.d/init.d/httpd1
chkconfig --add httpd1
测试
/etc/init.d/httpd1 start
netstat -ant |grep LISTEN
/etc/init.d/httpd1 stop
复制/usr/server/apache到/usr/server/apache1
修改/usr/server/apache/conf/httpd.conf 监听192.168.1.100
修改/usr/server/apache1/conf/httpd.conf 监听192.168.1.101 ServerRoot 为/usr/server/apache1
vi /usr/server/apache1/bin/apachectl
将里面所有的路径为apache的修改为apache1
vi /usr/server/apache1/bin/envvars
将里面所有的路径为apache的修改为apache1
vi /usr/server/apache1/bin/envvars-std
将里面所有的路径为apache的修改为apache1
创建系统启动文件
vi /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/apache1
exec_prefix=/usr/server/apache1
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
case "$1" in
start)
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
;;
esac
exit 0
==============================================================================
cp /usr/server/apache1/bin/apache.sysvinit /etc/rc.d/init.d/httpd1
chmod 755 /etc/rc.d/init.d/httpd1
chkconfig --add httpd1
测试
/etc/init.d/httpd1 start
netstat -ant |grep LISTEN
/etc/init.d/httpd1 stop
阅读全文
0 0
- Linux下安装多个apache
- Windows下安装多个Apache服务
- Windows下安装多个Apache服务
- Windows下安装多个Apache服务
- linux下apache绑定多个域名
- linux下安装apache
- apache安装linux下
- Linux下安装Apache
- Linux下安装apache
- linux下安装apache
- Linux下安装apache
- Linux下安装apache
- Linux下Apache安装
- linux下安装apache
- linux下apache安装
- linux下apache安装
- Linux下安装apache
- Linux下安装Apache
- linux error: ‘>>’ should be ‘> >’ within a nested template argument list
- cxf实战一
- 从写项目到部署linux服务器全过程-linux下tomcat的安装篇
- 肿瘤基因检测的解读流程
- Spring 如何在xml中配置Bean?
- Linux下安装多个apache
- 导入项目出现:Could not find com.android.support.constraint:constraint-layout:2.0.0-alpha8的解决方法
- file_upload上传
- 高性能Mysql学习笔记之第一章
- oj
- codeforces 901B GCD of Polynomials (数论+构造)
- placeholder---获取焦点时清空、修改默认样式
- 韦东山--关于嵌入式学习
- 同时装了Python3和Python2,怎么用pip?