httpd运用

2023-05-16

httpd运用

  • 1. httpd简介
  • 2. httpd版本
    • 2.1 httpd的特性
    • 2.2 httpd-2.4新增的模块
  • 3. httpd基础
    • 3.1 httpd自带的工具程序
    • 3.2 安装的httpd程序环境
          • //先关掉防火墙和selinux
          • //yum安装
          • //工作模型的使用
    • 3.3 web相关的命令
      • 3.3.1 curl命令(用来访问或下载)
          • //语法:curl [options] [URL ...]
          • //访问
          • //下载
      • 3.3.2 httpd命令
          • //语法:httpd [options]
  • 4. httpd常用配置
    • 4.1访问控制法则:
    • 4.2虚拟主机:
          • //查找虚拟主机.conf的位置并把它复制到本地
          • //标准配置
        • 2. 不同IP相同端口
        • 3. 相同IP相同端口不同域名
        • //在客户机上验证
          • 1.修改hosts文件
            • windows:
            • linux:

1. httpd简介

httpd是Apache超文本传输协议(HTTP)服务器的主程序。被设计为一个独立运行的后台进程,它会建立一个处理请求的子进程或线程的池。

通常,httpd不应该被直接调用,而应该在类Unix系统中由apachectl调用,在Windows中作为服务运行。

2. httpd版本

本文主要介绍httpd的两大版本,httpd-2.2和httpd-2.4。

  1. CentOS6系列的版本默认提供的是httpd-2.2版本的rpm包
  2. CentOS7系列的版本默认提供的是httpd-2.4版本的rpm包

2.1 httpd的特性

httpd有很多特性,下面就分别来说说httpd-2.2版本和httpd-2.4版本各自的特性。

版本特性
2.21. 事先创建进程
2. 按需维持适当的进程
3. 模块化设计,核心比较小,各种功能通过模块添加(包括PHP),支持运行时配置,支持单独编译模块
4. 支持多种方式的虚拟主机配置,如基于ip的虚拟主机,基于端口的虚拟主机,基于域名的虚拟主机等
5. 支持https协议(通过mod_ssl模块实现)
6. 支持用户认证
7. 支持基于IP或域名的ACL访问控制机制
8. 支持每目录的访问控制(用户访问默认主页时不需要提供用户名和密码,但是用户访问某特定目录时需要提供用户名和密码)
9. 支持URL重写
10. 支持MPM(Multi Path Modules,多处理模块)。用于定义httpd的工作模型(单进程、单进程多线程、多进程、多进程单线程、多进程多线程)
2.4httpd-2.4的新特性:
1. MPM支持运行DSO机制(Dynamic Share Object,模块的动态装/卸载机制),以模块形式按需加载
2. 支持event MPM,eventMPM模块生产环境可用
3. 支持异步读写
4. 支持每个模块及每个目录分别使用各自的日志级别
5. 每个请求相关的专业配置,使用来配置
6. 增强版的表达式分析器
7. 支持毫秒级的keepalive timeout
8. 基于FQDN的虚拟主机不再需要NameVirtualHost指令
9. 支持用户自定义变量
10. 支持新的指令(AllowOverrideList)
11. 降低对内存的消耗
工作模型(不能同时使用)工作方式
prefork(默认)多进程模型,预先生成进程,一个请求用一个进程响应
一个主进程负责生成n个子进程,子进程也称为工作进程
每个子进程处理一个用户请求,即使没有用户请求,也会预先生成多个空闲进程,随时等待请求到达,最大不会超过1024个
worker基于线程工作,一个请求用一个线程响应(启动多个进程,每个进程生成多个线程)
event基于事件的驱动,一个进程处理多个请求

2.2 httpd-2.4新增的模块

httpd-2.4在之前的版本基础上新增了几大模块,下面就几个常用的来介绍一下。

模块功能
mod_proxy_fcgi反向代理时支持apache服务器后端协议的模块
mod_ratelimit提供速率限制功能的模块
mod_remoteip基于ip的访问控制机制被改变,不再支持使用Order,Deny,Allow来做基于IP的访问控制

3. httpd基础

3.1 httpd自带的工具程序

工具功能
htpasswdbasic认证基于文件实现时,用到的帐号密码生成工具
apachectlhttpd自带的服务控制脚本,支持start,stop,restart
apxs由httpd-devel包提供的,扩展httpd使用第三方模块的工具
rotatelogs日志滚动工具
suexec访问某些有特殊权限配置的资源时,临时切换至指定用户运行的工具
abapache benchmark,httpd的压力测试工具

apachectl stop=systemctl stop httpd
yum用systemctl
rpm用apachectl

3.2 安装的httpd程序环境

文件/目录对应的功能
/var/log/httpd/access.log访问日志
/var/log/httpd/error_log错误日志
/var/www/html/站点文档目录
/usr/lib64/httpd/modules/模块文件路径
/etc/httpd/conf/httpd.conf主配置文件
/etc/httpd/conf.modules.d/*.conf模块配置文件
/etc/httpd/conf.d/*.conf辅助配置文件

mpm:以DSO机制提供,配置文件为/etc/httpd/conf.modules.d/00-mpm.conf

//先关掉防火墙和selinux

[root@yeqixian1 ~]# getenforce
Disabled
[root@yeqixian1 ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)

//yum安装

[root@yeqixian1 ~]# yum -y install httpd
[root@yeqixian1 ~]# ls /etc/httpd/
conf conf.d conf.modules.d logs modules run

网站所放的位置
[root@yeqixian1 ~]# ls /var/www/html/(默认为无)

[root@yeqixian1 ~]# systemctl start httpd(启动httpd服务)
[root@yeqixian1 ~]# ll /var/log/httpd
total 4
-rw-r–r-- 1 root root 0 May 11 18:41 access_log
-rw-r–r-- 1 root root 793 May 11 18:41 error_log

//工作模型的使用

//切换使用MPM(编辑/etc/httpd/conf.modules.d/00-mpm.conf文件):

[root@yeqixian1 ~]# vim /etc/httpd/conf.modules.d/00-mpm.conf(想用什么工作模型;就取消其前面的注释)
# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines:

# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so(prefork)

# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
#LoadModule mpm_worker_module modules/mod_mpm_worker.so(worker)

# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
#LoadModule mpm_event_module modules/mod_mpm_event.so(event)

[root@yeqixian ~]# httpd -M|grep prefork
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::b11b:ad9d:46c7:b3ec. Set the 'ServerName' directive globally to suppress this message
 mpm_prefork_module (shared)
[root@yeqixian ~]# httpd -M|grep worker
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::b11b:ad9d:46c7:b3ec. Set the 'ServerName' directive globally to suppress this message
[root@yeqixian ~]# httpd -M|grep event
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::b11b:ad9d:46c7:b3ec. Set the 'ServerName' directive globally to suppress this message

3.3 web相关的命令

3.3.1 curl命令(用来访问或下载)

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

curl支持以下功能:

  1. https认证
  2. http的POST/PUT等方法
  3. ftp上传
  4. kerberos认证
  5. http上传
  6. 代理服务器
  7. cookies
  8. 用户名/密码认证
  9. 下载文件断点续传
  10. socks5代理服务器
  11. 通过http代理服务器上传文件到ftp服务器
//语法:curl [options] [URL …]

//常用的options:
-A/–user-agent //设置用户代理发送给服务器
-basic //使用Http基本认证
–tcp-nodelay //使用TCP_NODELAY选项
-e/–referer //来源网址
–cacert //CA证书(SSL)
–compressed //要求返回时压缩的格式
-H/–header //自定义请求首部信息传递给服务器
-I/–head //只显示响应报文首部信息
–limit-rate //设置传输速度
-u/–user <user[:password]> //设置服务器的用户和密码
-0/–http1 //使用http 1.0版本,默认使用1.1版本。这个选项是数字0而不是字母o
-o/–output //把输出写到文件中
-#/–progress-bar //进度条显示当前的传送状态

//访问

[root@yeqixian ~]# curl http://192.168.116.145

//下载

root@yeqixian ~]# curl -o baidu http://www.baidu.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2381 100 2381 0 0 12833 0 --:–:-- --:–:-- --:–:-- 12940
[root@yeqixian ~]# ls
20200507_叶启贤_shell_nfs脚本_作业提交.sh info
aaa mima
anaconda-ks.cfg nfs-sh
backup.tar.gz rsa
baidu rsa.pub
gg sg
ggg ssh.sh
httpd-2.4.43 text
httpd-2.4.43.tar.gz yeqixian.tar.gz
[root@yeqixian ~]# cp baidu /opt/fff/

3.3.2 httpd命令

//语法:httpd [options]

//常用的options:
-l //查看静态编译的模块,列出核心中编译了哪些模块。
//它不会列出使用LoadModule指令动态加载的模块
-M //输出一个已经启用的模块列表,包括静态编译在服务
//器中的模块和作为DSO动态加载的模块
-v //显示httpd的版本,然后退出
-V //显示httpd和apr/apr-util的版本和编译参数,然后退出
-X //以调试模式运行httpd。仅启动一个工作进程,并且
//服务器不与控制台脱离
-t //检查配置文件是否有语法错误(=apachectl -t)

[root@yeqixian ~]# httpd -l
Compiled in modules:
  core.c
  mod_so.c
  http_core.c
[root@yeqixian ~]# httpd -M
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::b11b:ad9d:46c7:b3ec. 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)
 cache_module (shared)
 cache_disk_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)
 mime_magic_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 remoteip_module (shared)
 reqtimeout_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)
 dav_module (shared)
 dav_fs_module (shared)
 dav_lock_module (shared)
 lua_module (shared)
 mpm_prefork_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_scgi_module (shared)
 proxy_wstunnel_module (shared)
 systemd_module (shared)
 cgi_module (shared)
[root@yeqixian ~]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Aug  8 2019 11:41:18
[root@yeqixian ~]# httpd -V
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::b11b:ad9d:46c7:b3ec. Set the 'ServerName' directive globally to suppress this message
Server version: Apache/2.4.6 (CentOS)
Server built:   Aug  8 2019 11:41:18
Server's Module Magic Number: 20120211:24
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    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/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@yeqixian ~]# httpd -X
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::b11b:ad9d:46c7:b3ec. Set the 'ServerName' directive globally to suppress this message
^C
[root@yeqixian ~]# httpd -t
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::b11b:ad9d:46c7:b3ec. Set the 'ServerName' directive globally to suppress this message
Syntax OK
[root@yeqixian ~]#

4. httpd常用配置

4.1访问控制法则:

法则功能
Require all granted允许所有主机访问
Require all deny拒绝所有主机访问
Require ip IPADDR授权指定来源地址的主机访问
Require not ip IPADDR拒绝指定来源地址的主机访问
Require host HOSTNAME授权指定来源主机名的主机访问
Require not host HOSTNAME拒绝指定来源主机名的主机访问
IPADDR的类型HOSTNAME的类型
IP:192.168.1.1
Network/mask192.168.1.0/255.255.255.0
Network/Length:192.168.1.0/24
Net:192.168(192.168.0.0)
FQDN:特定主机的全名
DOMAIN:指定域内的所有主机

注意:httpd-2.4版本默认是拒绝所有主机访问的,所以安装以后必须做显示授权访问
[root@yeqixian1 html]# echo ‘hello world’ > index.html(页面文件为index.html;不能改)
http://192.168.116.145/runtime/
示例:

<Directory /var/www/html/www>

Require not ip 192.168.1.20
Require all granted

4.2虚拟主机:

虚拟主机有三类:

  1. 相同IP不同端口
  2. 不同IP相同端口
  3. 相同IP相同端口不同域名
//查找虚拟主机.conf的位置并把它复制到本地

[root@yeqixian1 ~]# find / -name *vhosts.conf
/usr/share/doc/httpd-2.4.6/httpd-vhosts.conf
[root@yeqixian1 ~]# cd /etc/httpd/conf.d/
root@yeqixian1 conf.d]# cp /usr/share/doc/httpd-2.4.6/httpd-vhosts.conf .

//标准配置

<VirtualHost *(ip)😡@Port(端口)@@>
ServerAdmin webmaster@dummy-host.example.com(管理员的邮箱地址,不需要)
DocumentRoot “@@ServerRoot@@/docs/dummy-host.example.com”(网站放的位置)
ServerName dummy-host.example.com(域名)
ServerAlias www.dummy-host.example.com(别名,不需要)
ErrorLog “/var/log/httpd/dummy-host.example.com-error_log”(错误日志)
CustomLog “/var/log/httpd/dummy-host.example.com-access_log” common(正确日志)

#### 1. 相同IP不同端口

[root@yeqixian1 ~]# mkdir -p /data/{www.a.com,www.b.com}
[root@yeqixian1 ~]# ll /data/
total 0
drwxr-xr-x 2 root root 6 May 12 15:09 www.a.com
drwxr-xr-x 2 root root 6 May 12 15:09 www.b.com
[root@yeqixian1 ~]# echo ‘www.a.com’ > www.a.com/index.html
-bash: www.a.com/index.html: No such file or directory
[root@yeqixian1 ~]# cd /data/
[root@yeqixian1 data]# echo ‘www.a.com’ > www.a.com/index.html
[root@yeqixian1 data]# echo ‘www.b.com’ > www.b.com/index.html
[root@yeqixian1 data]# httpd -t
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 192.168.116.145. Set the ‘ServerName’ directive globally to suppress this message
Syntax OK
[root@yeqixian1 data]# systemctl restart httpd

访问网页
http://192.168.116.145:81/(不加端口,默认是80)

2. 不同IP相同端口

[root@yeqixian1 conf.d]# vim httpd-vhosts.conf
<VirtualHost 192.168.116.145:80>
DocumentRoot “/data/www.a.com”
ServerName www.a.com
ErrorLog “/var/log/httpd/www.a.com-error_log”
CustomLog “/var/log/httpd/www.a.com-access_log” common
<Directory “/data/www.a.com”>

Require all granted


<VirtualHost 192.168.116.250:80>
DocumentRoot “/data/www.b.com”
ServerName www.b.com
ErrorLog “/var/log/httpd/www.b.com-error_log”
CustomLog “/var/log/httpd/www.b.com-access_log” common
<Directory “/data/www.b.com”>

Require all granted



[root@yeqixian1 conf.d]# ip addr add 192.168.116.250/24 dev eth0
[root@yeqixian1 conf.d]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:2a:89:d3 brd ff:ff:ff:ff:ff:ff
inet 192.168.116.145/24 brd 192.168.116.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet 192.168.116.250/24 scope global secondary eth0
valid_lft forever preferred_lft forever
[root@yeqixian1 conf.d]# systemctl restart httpd
[root@yeqixian1 conf.d]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:45917 :
LISTEN 0 64 *:2049 :
LISTEN 0 25 *:514 :
LISTEN 0 50 *:3306 :
LISTEN 0 128 *:111 :
LISTEN 0 128 *:80 :
当访问192.168.116.145时
在这里插入图片描述
当访问192.168.116.250时
在这里插入图片描述

3. 相同IP相同端口不同域名

[root@yeqixian1 conf.d]# vim httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot “/data/www.a.com”
ServerName www.a.com
ErrorLog “/var/log/httpd/www.a.com-error_log”
CustomLog “/var/log/httpd/www.a.com-access_log” common
<Directory “/data/www.a.com”>

Require all granted


<VirtualHost *:80>
DocumentRoot “/data/www.b.com”
ServerName www.b.com
ErrorLog “/var/log/httpd/www.b.com-error_log”
CustomLog “/var/log/httpd/www.b.com-access_log” common
<Directory “/data/www.b.com”>

Require all granted


//在客户机上验证

1.修改hosts文件
 ~ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost
118.31.33.0 zabbix.forevercq.com
0.0.0.0 account.jetbrains.com
//添加以下x行
172.16.12.128 www.wangqing.com(上文写了哪些ip和对应的域名写入到这个文件中)

要做映射(公司不需要)

windows:

C:\windows\system32\drivers\etc\hosts
在这里插入图片描述

linux:

\etc\hosts
//创建网页目录并修改属主属组(如果要别人可以写入)
[root@yeqixian1 conf.d]# ps -ef|grep httpd
root 22964 1 0 16:15 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 22981 22964 0 16:15 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache(需要改变的属主) 22982 22964 0 16:15 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 22983 22964 0 16:15 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 22984 22964 0 16:15 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 22985 22964 0 16:15 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 22989 22964 0 16:15 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
root 23280 18379 0 16:21 pts/0 00:00:00 grep --color=auto httpd
[root@localhost ~]# cd /var/www/html/
[root@localhost html]# ls
[root@localhost html]# mkdir www blog
[root@localhost html]# ll
total 0
drwxr-xr-x 2 root root 6 Aug 5 16:56 blog
drwxr-xr-x 2 root root 6 Aug 5 16:56 www
[root@localhost html]# chown -R apache.apache blog
[root@localhost html]# chown -R apache.apache www
[root@localhost html]# ll
total 0
drwxr-xr-x 2 apache apache 6 Aug 5 16:56 blog
drwxr-xr-x 2 apache apache 6 Aug 5 16:56 www

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

httpd运用 的相关文章

  • git http-backend基于centos7 httpd

    需要用户名密码的访问 网上已经有人分享了 如果想看 需要用户名密码的访问请出门右转 https www cnblogs com badwood316 p 6398616 html 这里的配置是一种不需要用户名密码 同时可以glone的方式
  • httpd详解

    httpd是一款高效的服务器应用程序 xff0c 是http协议的一种实现 在探讨httpd之前 xff0c 我们来大概了解一下http协议吧 xff0c http协议实现了客户端和web服务器之间的通信 xff0c 它是一种应用层协议 h
  • centos7 搭建httpd服务

    查看是否有httpd root 64 Cheney yum list httpd 已加载插件 xff1a fastestmirror langpacks Loading mirror speeds from cached hostfile
  • Httpd 服务

    httpd服务 1 httpd服务简介 Apache HTTP Server xff08 简称Apache或httpd xff09 是Apache软件基金会的一个开放源代码的网页服务器软件 xff0c 旨在为unix xff0c windo
  • httpd运用

    httpd运用 1 httpd简介2 httpd版本2 1 httpd的特性2 2 httpd 2 4新增的模块 3 httpd基础3 1 httpd自带的工具程序3 2 安装的httpd程序环境 先关掉防火墙和selinux yum安装
  • httpd服务

    httpd服务 文章目录 httpd服务1 httpd服务介绍2 常用的web程序3 httpd路径4 rpm安装httpd4 1 上传网站 5 源码安装httpd5 1 服务控制5 2 虚拟主机5 3 访问控制 6 生成证书 1 http
  • # HTTPD文件服务器,解决中文乱码

    HTTPD文件服务器 xff0c 解决中文乱码 CentOS7搭建httpd文件服务器 xff0c 解决中文乱码 安装Apache服务程序 apache服务的软件包名称叫做httpd 命令行输入 xff1a yum install http
  • httpd服务器常见漏洞修复,apache漏洞修复

    1 SSL TLS存在Bar Mitzvah Attack漏洞 由于apache服务器未安装SSL模块 xff0c 所以需要在不重新编译apahe的情况下安装mod ssl模块 1 0 安装apxs xff0c yum install ht
  • apache httpd在centos上手动安装

    Apache Bench手动安装 简介httpd及依赖包安装ab扩充最大并发量 简介 apache bench简称 xff08 ab xff09 可以做压力测试 xff0c 本文介绍手动安装方法 httpd及依赖包安装 以下包因为存在依赖关
  • 解决AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using local

    一 启动apache遇到错误 xff1a httpd Could not reliably determine the server s fully qualified domain name 二 修改配置 vim etc httpd co
  • linux /var/log/httpd 清理错误日志方法

    报错 xff1a 启动httpd报错 Job for httpd service failed 没有空间 linux中var磁盘满了的问题 BugSayNo的博客 CSDN博客 var目录满了有什么影响
  • Centos7下httpd最新版本安装或者更新至最新版本

    查找Centos上软件库里的httpd版本 yum info httpd yum info httpd 已加载插件 xff1a fastestmirror Loading mirror speeds from cached hostfile
  • 解决修改httpd配置文件Options Indexes FollowSymLinks仍然无法禁止访问网站目录

    由于一些特殊需求或者安全考虑 xff0c 需要禁止用户访问网站目录 xff0c 所以需要改httpd conf配置文件 一般来说 xff0c 命令如下 xff1a vim etc httpd conf httpd conf 找到目录标签下的
  • 配置基于域名的虚拟主机

    1 安装好apache之后 修改http conf文件 去掉Include conf extra httpd vhosts conf前的 Require all denied 改成 Require all granted 2 打开conf
  • 什么是 Apache Prefork、Worker 和 Event MPM(多处理模块)

    Apache 是最流行的 Linux Web 服务器 大多数Linux系统管理员的学习阶段都是从Apache httpd Web服务器开始的 甚至我在学习过程中也使用过Apache Web服务器 在初始级别 系统管理员使用 Apache 他
  • 使用yum info查看软件包信息与常用软件包

    记录 357 场景 在CentOS 7 9操作系统上 使用yum info查看软件包信息 包括软件包名称 适用架构 版本号 发行版 软件大小 仓库名称 概要 URL 许可证 描述 版本 操作系统 CentOS 7 9 1 iptables包
  • Linux Apache服务详解——Apache服务基础知识

    今天我们继续给大家介绍Linux相关内容 本文主要内容是Apache服务基础知识 一 Apache服务简介 Apache是一种网站服务程序 所谓网站服务程序 就是作为服务端 处理其他用户客户端发起的http或者https的请求 并给予响应的
  • Ubuntu 18.04下使用Apache搭建一个web服务器

    Ubuntu 18 04下使用Apache搭建一个web服务器 几个必要的概念 web服务器 以我之见 web服务器就是运行在计算机上的一个向整个网络或者是web客户端 浏览器提供文档的一个程序 我们通过http请求便可以获取到存储到web
  • 为支撑小程序接口,配置https

    1 从阿里云购买免费的ssl证书 博主太穷 买不起付费的 https common buy aliyun com spm 5176 7968328 1290860 26 59b61232sjkAJj commodityCode cas re
  • 如何在 CentOS/RHEL 7.6/6.9 和 Fedora 31/30 上安装 Apache/PHP 7

    您是否计划使用 Apache Web 服务器部署 PHP 应用程序 本教程将帮助您在 CentOS Redhat 和 Fedora 系统上安装 Apache Web 服务器和 PHP 推荐文章 适用于 Linux 的 LAMP 堆栈 Apa

随机推荐

  • Win7 应用程序无法正常启动(0xc000000d)的解决方法

    自从重装了WIN7系统后 xff0c VS2010编译出来的项目程序就不能正常启动 xff0c 启动的时候总是提示 应用程序无法正常启动 xff08 0xc000000d xff09 请单击 确定 关闭应用程序 在网上查找了很多解决方案 x
  • MySQL存储过程where条件执行失败的问题

    前几天对服务器实体做了属性缓存机制 xff0c 当时测试也没有出现大的问题 xff0c 昨天有人跟我说 xff0c 登陆的时候角色等级显示错误 xff0c 我复测了一下 xff0c 发现不只是等级错误 xff0c 进入游戏后角色位置 金钱
  • 程序员与厨师

    不管你信不信 反正我是信了 每一个程序员上辈子都是呆在厨房的厨子 好吧 你不信 我来证明给你看 1 下厨前 你得知道做的是早餐还是中晚餐 中晚餐的话 怎么也得走趟超市 如遇到好友聚会 怎么着也得做出一桌对得起朋友的饭菜 还有你得分析 朋友中
  • VS2010/VS2012 设置全局头文件和库路径

    在VS2010之前 xff0c 设置项目的全局头文件和库路径是非常方便的 xff0c 直接选择菜单Tools gt Options gt Projects and Solutions gt VC 43 43 Directories xff0
  • Linux下rz/sz安装及使用方法

    新搞的云服务器用SecureCRT不支持上传和下载 xff0c 没有找到rz命令 记录一下如何安装rz sz命令的方法 一 工具说明 在SecureCRT这样的ssh登录软件里 通过在Linux界面里输入rz sz命令来上传 下载文件 对于
  • 关于mysql存储过程创建动态表名及参数处理

    转载请注明出处 xff1a 帘卷西风的专栏 http blog csdn net ljxfblog 最近游戏开始第二次内测 xff0c 开始处理操作日志 xff0c 最开始把日志放到同一个表里面 xff0c 发现一天时间 xff0c 平均1
  • 关于mysql自增id的获取和重置

    转载请注明出处 xff1a 帘卷西风的专栏 http blog csdn net ljxfblog mysql获取自增id的几种方法 使用max函数 xff1a select max id from tablename 优点 xff1a 使
  • 关于SQL中Union和Join的用法

    转载请注明出处 xff1a 帘卷西风的专栏 http blog csdn net ljxfblog 一直以来 xff0c 对于数据库SQL方面都是半吊子水平 xff0c 能写一些基本的增删改查的语句 xff0c 大部分时间都是用下Where
  • 使用Cmake生成跨平台项目编译解决方案

    项目最近有需求在windows下面运行 xff0c 我花了几周时间将linux的服务器移植到windows下面 xff0c 目前已经能够正常运行服务器 xff0c 目前又有了新需求 xff0c 两边的代码结构和组织是分开的 xff0c 因此
  • linux下shell技巧

    经常看到一些大牛操作linux的时候 xff0c 双手运指如飞 xff0c 指令如流水般输出 xff0c 会不会感到羡慕呢 xff1f 本文就整理了一些linux下shell的技巧 xff0c 保管你学会之后 xff0c shell输出ap
  • Cmake在windows支持预编译头文件(stdafx.h)

    最近一直在研究cmake构建项目 xff0c 之前接触cmake的时候就感觉不太喜欢cmake xff0c 觉得它太乱了 xff0c 产生了太多的中间文件 xff0c 产生的项目文件也不是特别友好 xff0c 在windows下 xff0c
  • win服务器设置开机自动登录

    之前设置了一个开机自动执行脚本 xff0c 发现重启服务器之后没有生效 xff0c 原因在于 xff0c 服务器重启之后 xff0c 不会自动登录用户 xff0c 因此没有执行脚本 xff1b 因此第一步先设置服务器启动之后自动登录用户 x
  • Zynq ZC702平台 QSPI + eMMC实现

    预备知识 xff1a UG821 The processor system boot is a two stage process Another boot mode supported through FSBL is eMMC boot
  • 什么是Vista?

    Vista是微软下一代操作系统 xff0c 以前叫做Longhorn xff08 微软当初内部的代号 xff09 7月22日微软对外宣布正式名称是Windows Vista 作为微软的最新操作系统 xff0c Windows Vista第一
  • Android识别模拟器,判断是模拟器还是真机

    文章目录 前言原理禁止模拟器安装apk代码识别验证最后 前言 对于android开发者来说 xff0c 模拟器是开发工具 xff0c 但是对用户来说 xff0c 可能就是薅羊毛 找漏洞的赚钱工具 不管是活动风控还是内容保护等等其他的出发点
  • Dataframe.info()显示空值与类型信息

    使用Dataframe info 默认不带参数只显示摘要信息 如果想显示空值信息与类型信息 testData span class token punctuation span info span class token punctuati
  • 创建WinPE启动盘、常用imagex指令、常用dism指令

    创建WinPE启动盘 常用imagex指令 常用dism指令 一 创建WinPE启动盘 1 准备工作 下载WAIK工具 xff1a WAIK下载页面 lesca使用的WAIK版本 xff1a KB3AIK EN iso copype cmd
  • response.setContentType 文档输出类型

    1 Response AddHeader 34 content type 34 34 application x msdownload 34 类型列表 代宏的文档 2 34 34 61 34 application octet stream
  • 基于MAC Android 8.1源码下载编译阅读

    学Android也有比较长的一段时间了 xff0c 但是对于android源码的认识自己总感觉似懂非懂 xff0c 因为自己也仔细看过相关的书籍 对于遇到过的一些问题也分析过源码 xff0c 但还是觉得对于Android底层代码的实现存在一
  • httpd运用

    httpd运用 1 httpd简介2 httpd版本2 1 httpd的特性2 2 httpd 2 4新增的模块 3 httpd基础3 1 httpd自带的工具程序3 2 安装的httpd程序环境 先关掉防火墙和selinux yum安装