httpd的介绍-程序员宅基地

技术标签: nginx  linux  服务器  

httpd

1. 简介

1.1 httpd是apache软件包的名字,apache是超文本传输协议(http协议就是网站)的主程序。

2. 常用的web服务,实现网站服务

  • httpd ,Apache是开源免费的,有很多人不断对其进行完善。Apache的特点是简单、速度快、性能稳定,并可做代理服务器来使用。
  • nginx 是一个小巧且高效的HTTP服务器,也可以做一个高效的负载均衡反向代理,通过它接受用户的请求并分发到多个Mongrel进程可以极大提高Rails应用的并发能力
  • tomcat 技术先进、性能稳定,而且免费
  • IIS(windows)安全性,强大,灵活
2.1 httpd特性
2.1.1 httpd-2.2

1.事先创建进程,并且适量维持适量的进程

2.模块较小,核心较小,各种功能通过模块添加或者运行时也可配置

3.支持单独编译模块,使用时添加

4.支持多种虚拟主机配置(一个主机部署多个网站)如ip,端口和域名

5.支持https协议(证书加密)

6.用户认证

7.限制所有的ip和域名访问

8.目录的访问控制,用户访问某特定目录时需要提供用户名和密码,访问默认不需要

9.支持URL重写

10.多处理模块

2.1.2 httpd-2.4 新特性

1.支持动态共享对象模块的装/卸载机制(装载,功能启用,卸载功能关闭)

2.支持事件驱动(event mpm),电脑点一个文件,CPU很快会反映过来

3.异步读写(io)(做一件事没做完等待的时间去做别的事情)能提升效率

4.支持每个模块及每个目录分别使用各自的日志级别
5.每个请求相关的专业配置,使用来配置
6.增强版的表达式分析器

7.降低对内存的消耗

8.keepalive timeout(长连接做完一整件事,连接超时)

9.FQDN(完全限定域名)

[root@SYL3 ~]# hostnamectl set-hostname SYL3.example.com
[root@SYL3 ~]# bash
[root@SYL3 ~]# hostname
SYL3.example.com  //完全限定域名
[root@SYL3 ~]# syl3主机名

10.支持用户自定义变量
11.支持新的指令(AllowOverrideList)

2.1.3 httpd-2.4新增的模块
  • mod_proxy_fcgi — 反向代理时支持apache服务器后端协议的模块
  • mod_ratelimit — 速率限制功能的模块
  • mod_remoteip — 基于ip的访问控制机制被改变,不再支持使用Order,Deny,Allow来做基于IP的访问控制
2.3 httpd的工作模型
  • 单进程、单进程多线程、多进程、多进程单线程、多进程多线程

  • 线程包含在进程中,一个进程中可以并发多个线程

  • 模型

  • prefork — 多进程模型

    • 一个请求用一个进程,一个主进程负责多个子进程,每个子进程处理一个用户请求,即使没有用户请求,也会预先生成多个空闲进程
  • worker

    • 基于线程工作,一个请求用一个线程响应
  • event

    • 基于事件的驱动,一个进程处理多个请求

3. httpd的工具程序

3.1 自带的工具
  • 1.htpasswd

  • 功能:basic认证生成工具

  • 2.apachectl

  • 功能:源码装自带服务器控制脚本,支持启动(start),停止(stop),重启(restart)

  • 3.apxs

  • 功能:扩展httpd使用第三方模块的工具,由httpd-devel提供

  • 4.rotatelogs

  • 日志滚动工具

  • 5.suexec

  • 临时切换至指定用户运行的工具

  • 6.ab

  • httpd的压力测试工具,模拟多少用户来访问

[root@SYL3 ~]# which htpasswd
/usr/bin/htpasswd
[root@SYL3 ~]# which apachectl
/usr/sbin/apachectl
[root@SYL3 ~]# which apxs
/usr/bin/which: no apxs in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
[root@SYL3 ~]# which rotatelogs
/usr/sbin/rotatelogs
[root@SYL3 ~]# which suexec
/usr/sbin/suexec
[root@SYL3 ~]# which ab
/usr/bin/ab
[root@SYL3 ~]# which apxs
/usr/bin/apxs
[root@SYL3 ~]# 

4. IIS网站的部署

1.首选打开控制面板,点启用Windows功能
2.点开之后点Internet information services服务

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-G6JEW5Sh-1657286989402)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20220414171138029.png)]

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-BsfVyGAz-1657286989403)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20220414180435663.png)]

3. 搜索IIS网站

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-sJ6R8HAe-1657286989403)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20220414171554490.png)]

4.在本地添加文件夹并打开IIS

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-VP4L8HD7-1657286989403)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20220414171634420.png)]

5.查看或者添加网站

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-SajtBT2s-1657286989404)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20220414202453094.png)]

6. 访问成功

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-2X03RHFT-1657286989404)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20220414202406705.png)]

5. yum安装httpd部署网站

  • 安装httpd

  • [root@SYL3 ~]# yum -y install httpd
    Failed to set locale, defaulting to C.UTF-8
    Updating Subscription Management repositories.
    Unable to read consumer identity
    
[root@SYL3 httpd]# ls
[root@SYL3 httpd]# systemctl disable --now firewalld  //关闭防火墙
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@SYL3 httpd]# setenforce 0 关闭selinux防火墙
[root@SYL3 httpd]# systemctl enable --now httpd  开机自启apache
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@SYL3 httpd]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; e>
   Active: active (running) since Thu 2022-04-14 20:37:25 C>
     Docs: man:httpd.service(8)

  • 访问成功

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Ao8VDKOr-1657286989405)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20220414204049459.png)]

  • 下载一个网页地址
[root@SYL3 ~]# ls
abc  anaconda-ks.cfg  htmlxunakuhei  htmlxunakuhei.zip
[root@SYL3 ~]# cd htmlxunakuhei
[root@SYL3 htmlxunakuhei]# ls
'#U670d#U52a1#U5668#U4e4b#U5bb6.url'
'#U7cbe#U54c1#U514d#U8d39#U5546#U4e1a#U6e90#U7801#U4e0b#U8f7d.url'
 css
 fonts
 images
 index.html
 js
 m
[root@SYL3 htmlxunakuhei]# cp -r * /var/www/html/  //复制到httpd中
[root@SYL3 htmlxunakuhei]# 

  • 查看
[root@SYL3 httpd]# ls /var/www/html/
'#U670d#U52a1#U5668#U4e4b#U5bb6.url'
'#U7cbe#U54c1#U514d#U8d39#U5546#U4e1a#U6e90#U7801#U4e0b#U8f7d.url'
 css
 fonts
 images
 index.html
 js
 m
[root@SYL3 httpd]# 

  • 访问成功

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Z9k0WmhU-1657286989406)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20220414205537985.png)]

6. rpm包安装httpd的程序环境

  • 访问日志,错误日志

  • [root@SYL3 ~]# ls /var/log/httpd/
    access_log  //访问日志
    error_log   //错误日志
    [root@SYL3 ~]# 
    
  • 站点文档目录

  • [root@SYL3 ~]# ls /var/www/html/
    '#U670d#U52a1#U5668#U4e4b#U5bb6.url'
    '#U7cbe#U54c1#U514d#U8d39#U5546#U4e1a#U6e90#U7801#U4e0b#U8f7d.url'
     css
     fonts
     images
     index.html
     js
     m
    [root@SYL3 ~]# 
    
    
  • 模块文件路径

  • [root@SYL3 ~]# ls /usr/lib64/httpd/
    modules
    [root@SYL3 ~]# 
    
  • 主配置文件

  • [root@SYL3 ~]# cd /etc/httpd/conf
    [root@SYL3 conf]# ls
    httpd.conf //主配置文件
    magic
    
  • 模块配置文件

  • [root@SYL3 ~]# ls /etc/httpd/conf.modules.d/
    //这个目录下咦.conf文件
    00-base.conf  00-optional.conf  10-h2.conf
    00-dav.conf   00-proxy.conf     10-proxy_h2.conf
    00-lua.conf   00-systemd.conf   README
    00-mpm.conf   01-cgi.conf
    [root@SYL3 ~]# 
    
  • 辅助配置文件

  • [root@SYL3 ~]# ls /etc/httpd/conf.d/
    //以.conf文件结尾的文件是辅助配置文件
    README  autoindex.conf  userdir.conf  welcome.conf
    [root@SYL3 ~]# 
    
  • mpm:配置动态共享对象文件

  • [root@SYL3 ~]# ls /etc/httpd/conf.modules.d/
    00-mpm.conf 
    
    [root@SYL3 ~]# vim /etc/httpd/conf.modules.d/00-mpm.conf //配置工作模式
    #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
    
    #LoadModule mpm_worker_module modules/mod_mpm_worker.so
    
    LoadModule mpm_event_module modules/mod_mpm_event.so 
    //默认用的是事件驱动,三种模式只能用一个
    

7. web相关的命令

7.1 curl 可以用来下载和访问网站

curl是基于URL语法在命令行方式下工作的文件传输工具,它支持FTP,FTPS,HTTP,HTTPS,GOPHER,TELNET,DICT,FILE及LDAP等协议。

curl支持以下功能:

  • https认证
  • http的POST/PUT等方法
  • ftp上传
  • kerberos认证
  • http上传
  • 代理服务器
  • cookies
  • 用户名/密码认证
  • 下载文件断点续传
  • socks5代理服务器
  • 通过http代理服务器上传文件到ftp服务器
访问网站

[root@SYL3 ~]# curl http://192.168.232.128
<!DOCTYPE html>
<!--

⣿⣿⣿⣿⣿⣿⣧⢸⡿⣟⣿⡇⢸⣯⣟⣮⢧⡈⢿⣞⡿⣦⠘⠏⣹⣿⣽⢿⣿⣿⣿⣿⣯⣿⣿⣿⡇⢸⣿⣿⣾⡆⠹⢀⣠⣾⣟⣷⡈⢿
⣿⣿⣿⣿⣿⣿⣿⡈⣿⢿⣽⡇⠘⠛⠛⠛⠓⠓⠈⠛⠛⠟⠇⢀⢿⣻⣿⣯⢿⣿⣿⣿⣷⢿⣿⣿⠁⣾⣿⣿⣿⣧⡄⠇⣹⣿⣾⣯⣿⡄
⣿⣿⣿⣿⣿⣿⣿⡇⢹⣿⡽⡇⢸⣿⣿⣿⣿⣿⣞⣆⠰⣶⣶⡄⢀⢻⡿⣯⣿⡽⣿⣿⣿⢯⣟⡿⢀⣿⣿⣿⣿⣿⣧⠐⣸⣿⣿⣷⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⠘⣯⡿⡇⢸⣿⣿⣿⣿⣿⣿⣿⣧⡈⢿⣳⠘⡄⠻⣿⢾⣽⣟⡿⣿⢯⣿⡇⢸⣿⣿⣿⣿⣿⣿⡀⢾⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡇⢹⣿⠇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠻⡇⢹⣆⠹⣟⣾⣽⣻⣟⣿⣽⠁⣾⣿⣿⣿⣿⣿⣿⣇⣿⣿⠿⠛⠛⠉
⣿⣿⣿⣿⣿⣿⣿⣿⣿⡈⣿⡃⢼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡙⠌⣿⣆⠘⣿⣞⡿⣞⡿⡞⢠⣿⣿⣿⣿⣿⡿⠛⠉⠁⢀⣀⣠⣤⣤
⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠘⠁⠉⠉⠉⠉⠉⠉⠉⠉⠉⠙⠛⠛⢿⣄⢻⣿⣧⠘⢯⣟⡿⣽⠁⣾⣿⣿⣿⣿⣿⡃⢀⢀⠘⠛⠿⢿⣻⣟
⣿⣿⣿⣟⣿⣿⣿⣿⣶⣶⡆⢀⣿⣾⣿⣾⣷⣿⣶⠿⠚⠉⢀⢀⣤⣿⣷⣿⣿⣷⡈⢿⣻⢃⣼⣿⣿⣿⣿⣻⣿⣿⣿⡶⣦⣤⣄⣀⡀⠉
⣿⢿⣿⣿⣻⣿⣿⣿⣿⣿⡿⠐⣿⣿⣿⣿⠿⠋⠁⢀⢀⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣌⣥⣾⡿⣿⣿⣷⣿⣿⢿⣷⣿⣿⣟⣾⣽⣳⢯⣟
⣿⣻⣿⣿⡷⣿⣿⣿⣿⣿⡗⣦⠸⡿⠋⠁⢀⢀⣠⣴⢿⣿⣽⣻⢽⣾⣟⣷⣿⣟
⡄⢿⣿⣷⢀⠹⣟⣆⠻⣿⣿⣆⢀⣀⠉⠻⣿⡽⣯⣿⣿⣷⣈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢀⣠

 Time: 2021-11-3   原创:庞金明

<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Anle 一款酷黑风个人引导页</title>  
<!--页面核心样式-->
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<!--页面核心JS-->
<script type="text/javascript" src="js/uaredirect.js"></script>
<script type="text/javascript">browserRedirect("/m");</script>
<script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="js/respond.min.js"></script>
</head>
<body>
<div class="container slideTxtBox">
    <div class="header flex flex-pack-justify flex-align-center">
    <div class="user-info flex flex-align-center">
        <div class="portrait"><img src="https://www.678cnn.com/content/uploadfile/tpl_options//logopic.png" ></div>
        <div class="name PangMenZhengDao">zzvips</div><!--左上角 Logo+站名-->
    </div>
    <div class="link te_c p_r hd">
                <ul class="flex flex-align-center">
                        <li class="p_r"><a href="javascript:void(0);" class="transition OPPOSans-R di_bl">关于我</a></li>
                        <li class="p_r"><a href="javascript:void(0);" class="transition OPPOSans-R di_bl">朋友们</a></li>
                </ul>
                <div class="move-bg"></div><!--右上方 部件-->
        </div>
        </div>

<!--页面内容--> 
<div class="bd">
<!--左侧小部件-MacBook Air-->
<div class="content p_r">
        <div class="en_box flex flex-align-center flex-pack-center">
        <div class="macbook">
  <div class="inner">
    <div class="screen">
      <div class="face-one">
        <div class="camera"></div>
        <div class="display">
          <div class="shade"></div>
        </div>
      </div>
      <img src="http://www.clker.com/cliparts/i/s/H/f/4/T/apple-logo-white.svg" class="logo">
    </div>
    <div class="body">
      <div class="face-one">
        <div class="touchpad">
        </div>

<!--居中内容-->
<div class="r_content"> 
        <div class="con p_r flex">
         <!--你的名字-->   
        <div class="name flex flex-align-center flex-pack-center OPPOSans-M p_r" id="one_part">
        zzvips
        <div class="tips te_c OPPOSans-B transition"><span class="p_r c1">455px</span></div>
        </div>
        
        <!--小部件-GIF-->
        <div class="flex flex-align-center flex-pack-center iphone"><img src="images/icon_APP.gif"></div>
        <div class="flex flex-align-center flex-pack-center web"><img src="images/icon_WEB.gif"></div>
        <div class="flex flex-align-center flex-pack-center vr"><img src="images/icon_VR.gif"></div>
        </div>
        
7.2 下载
[root@SYL3 html]# curl -o index.html https://www.baidu.com
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--100  2443  100  2443    0     0   3571      0 --:--:-- --:--:-- --:--:--  3571
[root@SYL3 html]# ls
index.html
[root@SYL3 html]#
7.3 httpd命令
-l      查看静态编译的模块
-M      输出一个已经启用的模块列表,包括静态编译在服务器中的模块和作为DSO动态加载的模块
-v      显示httpd的版本,然后退出
-V      显示httpd和apr/apr-util的版本和编译参数,然后退出
-X      以调试模式运行httpd。仅启动一个工作进程,并且 服务器不与控制台脱离
-t      检查配置文件是否有语法错误
  • 静态编译(编译的过程中把所有的功能编译到主程序,主程序的功能全部都具备)文件主程序比较大 动态编译(在编译的过程会缺少新的功能,将新的功能动态的编译到一个模块,通过动态装卸载加载到配置文件中)模块比较小,需要哪个功能加载哪个.
  • 查看静态编译的模块—httpd -l
-l      查看静态编译的模块
[root@SYL3 ~]# httpd -l
Compiled in modules:
  core.c
  mod_so.c
  http_core.c
  • 查看静态,动态编译的模块— httpd -M
-M      输出一个已经启用的模块列表,包括静态编译在服务器中的模块和作为DSO动态加载的模块
[root@SYL3 ~]# httpd -M
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe88:169d. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 access_compat_module (shared)
 actions_module (shared)
 alias_module (shared)
 allowmethods_module (shared)
 auth_basic_module (shared)
 auth_digest_module (shared)
 authn_anon_module (shared)
 authn_core_module (shared)
 authn_dbd_module (shared)
 authn_dbm_module (shared)
 authn_file_module (shared)
 authn_socache_module (shared)
 authz_core_module (shared)
 authz_dbd_module (shared)
 authz_dbm_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_owner_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 brotli_module (shared)
 cache_module (shared)
 cache_disk_module (shared)
 cache_socache_module (shared)
 data_module (shared)
 dbd_module (shared)
 deflate_module (shared)
 dir_module (shared)
 dumpio_module (shared)
 echo_module (shared)
 env_module (shared)
 expires_module (shared)
 ext_filter_module (shared)
 filter_module (shared)
 headers_module (shared)
 include_module (shared)
 info_module (shared)
 log_config_module (shared)
 logio_module (shared)
 macro_module (shared)
 mime_magic_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 remoteip_module (shared)
 reqtimeout_module (shared)
 request_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 slotmem_plain_module (shared)
 slotmem_shm_module (shared)
 socache_dbm_module (shared)
 socache_memcache_module (shared)
 socache_shmcb_module (shared)
 status_module (shared)
 substitute_module (shared)
 suexec_module (shared)
 unique_id_module (shared)
 unixd_module (shared)
 userdir_module (shared)
 version_module (shared)
 vhost_alias_module (shared)
 watchdog_module (shared)
 dav_module (shared)
 dav_fs_module (shared)
 dav_lock_module (shared)
 lua_module (shared)
 mpm_event_module (shared)
 proxy_module (shared)
 lbmethod_bybusyness_module (shared)
 lbmethod_byrequests_module (shared)
 lbmethod_bytraffic_module (shared)
 lbmethod_heartbeat_module (shared)
 proxy_ajp_module (shared)
 proxy_balancer_module (shared)
 proxy_connect_module (shared)
 proxy_express_module (shared)
 proxy_fcgi_module (shared)
 proxy_fdpass_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_hcheck_module (shared)
 proxy_scgi_module (shared)
 proxy_uwsgi_module (shared)
 proxy_wstunnel_module (shared)
 systemd_module (shared)
 cgid_module (shared)
 http2_module (shared)
 proxy_http2_module (shared)
[root@SYL3 ~]# 
  • 显示httpd的版本 -v
[root@SYL3 ~]# httpd -v
Server version: Apache/2.4.37 (centos)
Server built:   Nov 12 2021 04:57:27
[root@SYL3 ~]# 
  • 显示httpd和apr/apr-util的版本和编译参数 -V
[root@SYL3 ~]# httpd -V
Server version: Apache/2.4.37 (centos)
Server built:   Nov 12 2021 04:57:27
Server's Module Magic Number: 20120211:83
Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture:   64-bit //结构 64位
Server MPM:     event  //模型 
  threaded:     yes (fixed thread count)//混合线程
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
[root@SYL3 ~]# 
  • 检查配置文件是否有语法错误 -t
root@SYL3 ~]# httpd -t
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe88:169d. Set the 'ServerName' directive globally to suppress this message
Syntax OK
[root@SYL3 ~]# httpd -t
AH00526: Syntax error on line 34 of /etc/httpd/conf/httpd.conf:
Invalid command '11111erverRoot', perhaps misspelled or defined by a module not included in the server configuration

pache_runtime_status"
-D DEFAULT_ERRORLOG=“logs/error_log”
-D AP_TYPES_CONFIG_FILE=“conf/mime.types”
-D SERVER_CONFIG_FILE=“conf/httpd.conf”
[root@SYL3 ~]#


- 检查配置文件是否有语法错误 -t

```basic
root@SYL3 ~]# httpd -t
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe88:169d. Set the 'ServerName' directive globally to suppress this message
Syntax OK
[root@SYL3 ~]# httpd -t
AH00526: Syntax error on line 34 of /etc/httpd/conf/httpd.conf:
Invalid command '11111erverRoot', perhaps misspelled or defined by a module not included in the server configuration

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/mushuangpanny/article/details/125686304

智能推荐

使用Cygwin, Cygwin/X 介绍-程序员宅基地

文章浏览阅读1.7k次。 空间Using CygwinAs noted, Cygwin provides a Unix-like environment under Windows. The installation directory (by default, c:\cygwin) is the root of the Unix-like file system, which contains bin, et..._cygwin/x

#如何查看oracle的sid_oracle 只读账号 怎么查看sid-程序员宅基地

文章浏览阅读2.5k次,点赞2次,收藏3次。#如何查看oracle的sid转载:https://www.cnblogs.com/lcword/p/8214334.html1、怎样查看Oracle的数据库名称sid用sysdba身份登录 比如 conn sys/密码 as sysdba 匿名管理员登陆执行 select name form Vdatabase;(常用的方法)或是执行select∗fromVdatabase; (常用的方..._oracle 只读账号 怎么查看sid

第3章 信息系统集成专业技术知识-程序员宅基地

文章浏览阅读6.9k次。本章考试分值 15 分主要考点:(1)、信息系统的生命周期(2)、信息系统开发方法(3)、设备、DBMS及技术选型(4)、软件需求(5)、软件设计(6)、软件测试(7)、软件维护(8)、软件复用(9)、软件质量保证及质量评价(10)、软件配置管理(11)、面向对象(12)、软件架构(13)、中间件(14)、数据仓库(15)、网络协议(16)、网络存储(17)、网络安全(18)、网络交换技术(19)、大数据(20)、云计算_信息系统集成专业技术知识

SQL Server——T-SQL基础技术_1、熟练使用t-sql语句对表进行投影、连接、选择查询 2、能根据要求-程序员宅基地

文章浏览阅读3.7k次,点赞3次,收藏7次。文章目录T-SQL基础技术基本语法格式代码准备:(可以按照我的实例自行建立数据库)1、投影查询a、投影指定的列b、投影全部列c、修改查询结果的列标题d、去掉重复行2、选择查询a.表达式比较b.范围比较c.模式匹配d.空值使用代码示例:3、连接查询a.连接谓词b.以JOIN关键字指定的连接(1)内连接(2)外连接4、统计计算5、排序查询6、子查询T-SQL基础技术T-SQL语言中最重要的部分是它..._1、熟练使用t-sql语句对表进行投影、连接、选择查询 2、能根据要求

realsense D4XX系列相机彩色图像素到空间点的转化原理_d415 原理-程序员宅基地

文章浏览阅读1.3k次,点赞3次,收藏9次。realsense D4XX系列相机代码,但原理是通用的。RGB-D相机根据彩色图像素获得空间点/* Given pixel coordinates and depth in an image with no distortion or inverse distortion coefficients, compute the corresponding point in 3D space re..._d415 原理

Java——JComboBox下拉列表框与选中状态改变的监听_java中swing中使用combobox监听-程序员宅基地

文章浏览阅读3.6k次,点赞6次,收藏30次。设置下拉列表框大小以及位置,为下拉列表框添加选项,将下拉列表框加入到JFrame窗口 JComboBox JC=new JComboBox(); JC.setBounds(140,200,100,70);//设置下拉列表框大小以及位置 //为下拉列表框添加选项 JC.addItem("123"); JC.addItem("456"); JF.add(JC);//将下拉列表框加入到JFrame窗口......_java中swing中使用combobox监听

随便推点

07vuex笔记 module 03_vuex模块化-程序员宅基地

文章浏览阅读119次。// App.vue<template> <div id="app"> </div></template><script>import { mapState, mapActions } from 'vuex';export default { name: 'app', computed: mapSta..._vuex模块化

TS报错整理_在赋值前使用了变量-程序员宅基地

文章浏览阅读1.6w次,点赞10次,收藏57次。记录一下最近项目中TS报错及解决一.找不到模块“images/1.png”或其相应的类型声明。报错图:原因:TS没有识别图片模块解决方法:加上图片格式声明模块????成功不报红:二.类型“unknown”上不存在属性“data”。同:类型“{}”上不存在属性“data”。报错图:原因:对象上本没有某个属性,没有语法检测到该属性(即对象属性不明确)解决方法:定义对象的接口,但是往往后端数据是不能确定的,这个时候使用第二种方法将这个对象_在赋值前使用了变量

WebRTC中音频能量计算_webrtc audiolevel-程序员宅基地

文章浏览阅读3.9k次。1.WebRTC中音频能量计算WebRTC中实现获取音频能量计算的方法是:获取音频数据最大的振幅(即绝对值最大)(范围是0-32767),然后再除以1000,得到0-32之间的数值。从数组中获取相应索引所对应的能量level等级。我们看下webRTC中level_indicator.cc中对音频level判断的处理。namespace webrtc {namespace voe {// Number of bars on the indicator.// Note that the numb_webrtc audiolevel

Duilib中为RichEdit\Edit控件添加自定义右键菜单_duilib richedit-程序员宅基地

文章浏览阅读7.9k次,点赞4次,收藏5次。前言Duilib中的RichEdit控件在使用中发现,基本上对复制、粘贴、剪切等快捷方式都是支持的,不过唯一缺点是没有右键菜单,感觉不够好,于是就想着加上右键菜单。右键菜单基本思路是,在RichEdit的消息处理函数中对鼠标的右键消息处理,发送一个自定义的Notify消息出来,主窗口中受到这个消息后弹出自己的右键菜单。实现方法第一步:把鼠标右键消息转_duilib richedit

MongoDB解决:Error parsing YAML config file: yaml-cpp: error at line 3, column 8: illegal map value-程序员宅基地

文章浏览阅读6.3k次,点赞8次,收藏7次。在启动MongoDB的过程中遇到的问题:出现:Error parsing YAML config file: yaml-cpp: error at line 3, column 8: illegal map value报错这个错误是属于文件格式错误解决方法:我是用的手动配置conf文件,我在配置的过程中只是敲了两个空格,但是经过查阅资料得知:mongodb 3.0之后配置文件采用YAML格式,这种格式非常简单,使用:表示,开头使用“空格”作为缩进。需要注意的是,“:”之后有value的话,需要_error parsing yaml config file: yaml-cpp: error at line 3, column 8: illegal

【C语言趣味编程100题】_趣味编程题-程序员宅基地

文章浏览阅读3.2k次,点赞4次,收藏30次。C语言趣味编程100题1.百钱百鸡——解不定方程组1.百钱百鸡——解不定方程组/*问题描述:1只公鸡5钱,1只母鸡3钱,3只小鸡1钱,现有100钱要买100只鸡,改怎么买?问题分析:设买公鸡cock只,母鸡Hen只,小鸡chicken只列出如下不定方程:cock+hen+chicken=1005cock+3hen+chicken/3=100解决方法:实质是解不定方程,使用穷举法 */#include <stdio.h>int main(){ int cock, hen_趣味编程题

推荐文章

热门文章

相关标签