博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
apache配置
阅读量:4027 次
发布时间:2019-05-24

本文共 1202 字,大约阅读时间需要 4 分钟。

1.下载httpd-2.2.15.tar.gz

2. tar zxvf httpd-2.2.15.tar.gz       #解压文件会生成httpd-2.2.15目录 

3../configure --prefix=/usr/local/apache-2.2.15  --enable-so --enable-mods-shared=most --with-mpm=worker 

4.make

5.make install

6.apache开启:./apachectl start

7.apache配置文件做如下修改(httpd.conf)

Listen 10020 #侦听的端口号

ServerName 10.6.222.47:10020 #服务器的ip地址

#DocumentRoot "/home/tobyweng/usr/local/apache//htdocs" #这行我注释掉,等下在虚拟主机处配置

#<Directory "/home/tobyweng/usr/local/apache//htdocs">

........

.....

.......

#</Directory> #这一段我也注释掉,与上面匹配起来

以下是设置一个IP多站点

NameVirtualHost 10.6.222.47:10020
<VirtualHost 10.6.222.47:10020>
        ServerName tobyweng.com #站点域名的设置
        DocumentRoot /home/tobyweng/usr/local/apache//htdocs #index存放位置的设置
        <Directory "/home/tobyweng/usr/local/apache//htdocs"> #设置同上
                 Options Indexes FollowSymLinks
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>
<VirtualHost 10.6.222.47:10020>
        ServerName satan.com
        DocumentRoot /home/tobyweng/usr/local/apache//baidu.com
        <Directory "/home/tobyweng/usr/local/apache//baidu.com">
                 Options Indexes FollowSymLinks
                AllowOverride None
                 Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>

8.win7系统中hosts文件设置,文件在/windods/system32/driver/etc/hosts,具体设置有exmple

转载地址:http://ltpbi.baihongyu.com/

你可能感兴趣的文章
自定义 select 下拉框 多选插件
查看>>
js判断数组内是否有重复值
查看>>
js获取url链接携带的参数值
查看>>
gdb 调试core dump
查看>>
gdb debug tips
查看>>
arm linux 生成火焰图
查看>>
jtag dump内存数据
查看>>
linux和windows内存布局验证
查看>>
linux config
查看>>
linux insmod error -1 required key invalid
查看>>
linux kconfig配置
查看>>
linux不同模块completion通信
查看>>
linux printf获得时间戳
查看>>
C语言位扩展
查看>>
linux dump_backtrace
查看>>
linux irqdebug
查看>>
git 常用命令
查看>>
linux位操作API
查看>>
snprintf 函数用法
查看>>
uboot.lds文件分析
查看>>