跳转到内容

ZczBlog

  • 首页
  • 前端
    • HTML
    • CSS
    • JavaScript
    • jQuery
  • Linux系统
    • Linux
    • Ubuntu/debian
  • 数据库
    • MySQL
    • NoSQL
  • PHP
  • 其他

Apache类别订阅

Debian服务器给编译安装的Apache设置系统服务

1. 创建 systemd 服务文件 使用文本编辑器创建 Apache 的 systemd 服务文件… 继续阅读 Debian服务器给编译安装的Apache设置系统服务

  • 发表于: 2025年4月21日 2025年4月21日
  • 作者: 张 存志
  • 分类: Apache, Ubuntu/debian

Debian服务器上面配置Apache的ssl证书

1. 安装 Apache 和 SSL 模块: [crayon-684da11188753352949… 继续阅读 Debian服务器上面配置Apache的ssl证书

  • 发表于: 2025年4月11日 2025年4月11日
  • 作者: 张 存志
  • 分类: Apache, Ubuntu/debian

Debian设置Apache2的日志轮转

步骤一:确认 logrotate 和 Apache 相关配置情况 检查 logrotate 是否已安… 继续阅读 Debian设置Apache2的日志轮转

  • 发表于: 2024年11月26日 2024年11月26日
  • 作者: 张 存志
  • 分类: Apache

编译安装Apache的Security2模块

下载mod_security源代码

1
2
3
wget https://github.com/SpiderLabs/ModSecurity/archive/v2.9.3.tar.gz
tar -xzvf v2.9.3.tar.gz
cd ModSecurity-2.9.3/

… 继续阅读 编译安装Apache的Security2模块

  • 发表于: 2024年4月3日 2024年4月9日
  • 作者: 张 存志
  • 分类: Apache

Debian编译安装Apache

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
apt install sudo ssh vim mc ncdu tree git curl nmap net-tools zip gcc automake autoconf libtool make rpm wget ntpdate psmisc telnet build-essential zlib1g-dev libpcre3-dev libssl-dev libexpat1-dev g++
 
wget http://archive.apache.org/dist/apr/apr-1.7.4.tar.gz
tar -zxf apr-1.7.4.tar.gz
cd apr-1.7.4
./configure --prefix=/usr/local/lib/apr
make
make install
 
wget http://archive.apache.org/dist/apr/apr-util-1.6.3.tar.gz
tar -zxf apr-util-1.6.3.tar.gz
cd apr-util-1.6.3
./configure --prefix=/usr/local/lib/apr-util -with-apr=/usr/local/lib/apr/bin/apr-1-config
make
make install
 
wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz
tar -zxf pcre-8.45.tar.gz
cd pcre-8.45
./configure --prefix=/usr/local/lib/pcre
make
make install
 
wget https://downloads.apache.org/httpd/httpd-2.4.57.tar.gz
tar -zxvf httpd-2.4.57.tar.gz
cd httpd-2.4.57
cd srclib/
cp -r ../../apr-1.7.4/ apr/
cp -r ../../apr-util-1.6.3/ apr-util/
./configure --prefix=/usr/local/lib/apache2 --with-apr=/usr/local/lib/apr --with-apr-util=/usr/local/lib/apr-util --enable-dav --enable-proxy --enable-maintainer-mode --enable-rewrite --enable-access_compat --enable-alias --enable-auth_basic --enable-auth_digest --enable-authn_core --enable-authn_file --enable-authz_core --enable-authz_host --enable-authz_user --enable-autoindex --enable-dav_fs --enable-deflate --enable-dir --enable-env --enable-filter --enable-headers --enable-mime --enable-negotiation --enable-reqtimeout --enable-setenvif --enable-status --enable-ssl=shared --enable-expires=shared --enable-static-support --with-included-apr --with-mpm=prefork --enable-cache --enable-file-cache
make
make install
 
#安装完成之后查看libphp*.so 的位置 然后复制到/usr/local/lib/apache2/modules
find / -name "libphp*"
cp /usr/lib/apache2/modules/libphp7.1.so modules/libphp7.so
 
#修改Apache的配置文件
#关闭Apache的服务
systemctl disable apache2
#将安装的Apache设置开机启动, 在/etc/rc.local 文件中添加一行, 一定要给rc.local文件可执行权限, 否则文件不生效
/usr/local/lib/apache2/bin/apachectl start
 
 

 

  • 发表于: 2023年8月7日 2024年5月7日
  • 作者: 张 存志
  • 分类: Apache, Linux系统, Ubuntu/debian, 中间件

Apache配置webdav

1. 启动Apache的dav服务

1
2
a2enmod dav_fs
a2enmod dav

… 继续阅读 Apache配置webdav

  • 发表于: 2023年2月22日 2023年4月21日
  • 作者: 张 存志
  • 分类: Apache, 中间件

apache 设置禁止访问某些文件或目录

【apache配置禁止访问】 1. 禁止访问某些文件/目录 增加Files选项来控制,比如要不允许访… 继续阅读 apache 设置禁止访问某些文件或目录

  • 发表于: 2022年12月5日 2022年12月5日
  • 作者: 张 存志
  • 分类: Apache, 中间件

Apache给webdav添加用户

htpasswd命令 网络服务器 htpasswd命令是Apache的Web服务器内置工具,用于创建… 继续阅读 Apache给webdav添加用户

  • 发表于: 2022年10月20日 2023年2月22日
  • 作者: 张 存志
  • 分类: Apache, 中间件, 其他

© 2025  ZczBlog.                        豫ICP备18029062号