• linux服务器搭建(http) 涂涂


    搭建web服务器

    1、查看是否有HTTP服务

    rpm –qa|grep httpd

    2、挂载

    mkdir /mnt/cdrom

    mount –t iso9660 /dev/cdrom /mnt/cdrom

    3、找到server文件夹

    cd /mnt/cdrom/Server

    4、安装httpd服务

    ls httpd*

    rpm –ivh apr-1.2.7-11.el5.i386.rpm

    rpm –ivh postgresql-libs-8.1.11-1.el5_1.1.i386.rpm

    rpm –ivh apr-util-1.2.7-7.el5.i386.rpm

    rpm –ivh httpd-2.2.3-22.el5.i386.rpm

    5、检查安装

    rpm -qa|grep httpd

    6、配置文件

    vi /etc/httpd/conf/httpd.conf

    ①57行:ServerRoot http运行目录

    ②68行:TimeOut 超时

    ③134行:Listen 监听端口(80)

    ④251行:ServerAdmin 邮箱地址

    ⑤265行:ServerName 写域名或IP地址

    ⑥281行:DocumentRoot 访问网页目录

    ⑦391行:DirectoryIndex 默认访问的页面(首页)

    ⑧747行:AddDefaultCharset 默认字体编码

    ⑨目录设置:

    <Directoryf>

    Order allow.deny

    Allow from 192.168.1.0/24

    Deny from 192.168.1.200

    </Directory>

    ⑩虚拟目录:958行

    <VirturalHost*: 80> 注释:*指当前本地ip地址(可不写)

    ServerName www.fendoujiaoyu.com

    DocumentRoot /var/www/html

    </VirturalHost>

    <VirturalHost*: 80>

    ServerName bbs.fendoujiaoyu.com

    DocumentRoot /var/www/html/pbbs

    </VirturalHost>

    7、开启服务

    chkconfig httpd on 或 service httpd start

    参考:https://blog.csdn.net/wh_forever/article/details/51750606

  • 相关阅读:
    apache 页面压缩技术mod_deflate安装和配置
    获取指定目录下的所有文件名和路径(包括子目录)
    ThinkPHP框架项目开发专题自动验证
    hd cdnServer 51cdn / ChinaCache / ATS / Apache Traffic Server
    js calendar / wannianli
    OS + Unix Solaris / openSolaris
    project web architecture
    OS + Unix HPUX
    逻辑左移
    桂林游览2
  • 原文地址:https://www.cnblogs.com/51python/p/15544472.html
Copyright © 2020-2023  润新知