位置: 编程技术 - 正文

Apache安装、配置、优化(apache2.4.46配置)

编辑:rootadmin

推荐整理分享Apache安装、配置、优化(apache2.4.46配置),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:Apache安装配置完成后,apache2.2安装教程,Apache安装配置完成后,Apache安装配置完成后,有些不用的文件应该及时,Apache安装配置完成后,有些不用的文件应该及时,Apache安装配置完成后,Apache安装配置完成后,Apache安装配置完成后,内容如对您有帮助,希望把文章链接给更多的朋友!

安装 Apache 2.0. (查看Install手册)

  考虑到以后要 rewite_url 来使 google 更加容易收录网站,特地添加了 mod_rewrite 。

  同时为了限制流量,特别加了 mod_limitpcnn.c 补丁 , 所以多了一个 --enable-forward 选项。

  建议安装完毕以后不要删除安装目录,以便以后升级时使用。

  记得升级前关闭 apache2.0

  编译过程:     代码:

#./configure --enable-so --enable-speling --enable-rewrite --with-ssl=/usr/local/ssl --enable-forward   # make   # make install

  这个例子里面是编译了 mod_so,mod_speling 和 openssl 支持。   同样有另外几种写法     代码:

#./configure --enable-modules=so --enable-modules=speling --enable-modules=rewrite    或者     代码:

#./configure --enable-modules=”so speling”    --enable-MODULE[=shared] 编译并包含模块 MODULE. MODULE 是文档中去掉” _module ”的模块名。要将一个模块编译成为 DSO, 需要加 -shared 选项 , 即 --enable-mods-shared 。 (查看 MODULE 手册)     注意 :"如果希望核心能够装载 DSO,而不实际编译任何动态模块,则要明确指定 --enable-modules=so 或者 --enable-so" (查看 DSO 手册),所以前面的顺序不能交换顺序。 查看所有apache 的 configure 参数     安装完毕后可以用以下命令来查看启动了那些模块     代码:

  # apachectl -l   Compiled in modules:   core.c   mod_access.c   mod_auth.c   mod_include.c   mod_log_config.c   mod_env.c   mod_setenvif.c   prefork.c   http_core.c   mod_mime.c   mod_status.c   mod_autoindex.c   mod_asis.c   mod_cgi.c   mod_negotiation.c   mod_dir.c mod_imap.c   mod_actions.c   mod_speling.c   mod_userdir.c   mod_alias.c   mod_rewrite.c   mod_so.c 

  接着,将启动程序放入开机程序中去。 如果要启动 ssl 加密网页,则必须通过手动启动 apache2.0 (参见 ssl 部分 )     代码:

# echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.d/rc.local

  参考:

  代码:

Apache安装、配置、优化(apache2.4.46配置)

If you want your server to continue running after a system reboot ,   you should add a call to apachectl to your system startup files (typically rc.local or   a file in an rc.N directory). This will start Apache as root. Before doing this ensure   that your server is properly configured for security and access restrictions. 

  在 profile 里面添加以上的语句来设置路径,使得在 bash 下更容易控制 apachectl, 省去了输入路径的麻烦。     代码:

# vi /etc/profile   PATH="  $PATH:usr/local/apache2/bin:”    配置 apache2.0

  代码:

# vi /usr/local/apache2/conf/httpd.conf    配置文件请看文件 httpd.conf (设置文档目录为/home/dalouis/public_html)     代码:

#chmod – R /home/dalouis/    设置目录的可读性为 drwxr-xr-x(), 否则会出现 "Forbidden You don't have permission to access / on this server."     一些关于安全性的配置:     考虑到 cgi-bin 的安全性问题,我们暂时将 cgi-bin 去掉。将所有 httpd.conf 中的所有关于 cgi-bin 的行加上 #.

  Xiyang 的配置

  我用的: mod_limitipconn, mod_expires, mod_gzip, mod_php4, mod_so, mod_access, mod_alias, mod_userdir, mod_dir, mod_autoindex, mod_status, mod_mime, mod_log_config, http_core     关于超时的问题

  在我编写好所有的产品查看页面的时候,经常会出现因为超时,或者流量过大 ,apache 停止工作的问题,原因有二,一是代码的不科学性,二是 apache 的设置问题。     以下是对设置的一点改动:     代码:

# KeepAlive: Whether or not to allow persistent connections(more than   # one request per connection). Set to "Off" to deactivate.     # KeepAlive Off     # MaxKeepAliveRequests: The maximum number of requests to allow   # during a persistent connection. Set to 0 to allow an unlimited amount.   # We recommend you leave this number high, for maximum performance.     # MaxKeepAliveRequests 0     # KeepAliveTimeout: Number of seconds to wait for the next request   # from the same client on the same connection.     # KeepAliveTimeout 0

  • 记录访问者的 HTTP-REFERER 和 AGENT, 有助于统计来者是通过什么搜索引擎找到我们的网站的。 或者在原有的CustomLog行,将参数由 common 改成 combined

  代码:

# If you would like to have agent and referer logfiles,   # uncomment the following directives.   CustomLog logs/referer_log referer         CustomLog logs/agent_log agent   CustomLog logs/www.domain.com-access_log combined

  使用 mod_limitipconn.c 来限制 apache 的并发数     Package: DSO 并 patch apache2.0, 以使得 apache2.0 可以认识在代理后方的 IP 。但是要 重新编译 apache2.0, 以下是介绍。     代码:

##Instructions for building DSO with proxy tracking:   # tar xzvf httpd-2.0..tar.gz   # tar xzvf mod_limitipconn-0..tar.gz   # cd httpd-2.0.   # patch -p1 < ../mod_limitipconn-0./apachesrc.diff   # ./buildconf   # ./configure --enable-so --enable-speling --enable-rewrite --with-ssl=/usr/local/ssl --enable-forward   # make   # make install   # cd ../mod_limitipconn-0.   # PATH=/usr/local/apache2/bin: $PATH   # make install

  安装过程

# lynx   # tar -zxvf mod_limitipconn-0..tar.gz   # cd httpd-2.0.   # patch -p1 < ../mod_limitipconn-0./apachesrc.diff   patching file configure.in   Hunk #1 succeeded at (offset lines).   patching file include/scoreboard.h   patching file modules/generators/mod_status.c   Hunk #1 succeeded at (offset -1 lines).

Linux系统Jsp的环境:Apache,Tomcat配置 1.操作系统RedHatLinux9..所需软件Apache2.0.下载地址

linux系统vi命令详解 进入vi的命令vifilename:打开或新建文件,并将光标置于第一行首vi+nfilename:打开文件,并将光标置于第n行首vi+filename:打开文件,并将光标置于最后一行

RHEL5 Apache+Tomcat整合,同时支持jsp与php 配置环境:OS:RHEL5withkernel2.6.-8.1.1.el5httpd-2.2.3-6.el5.i.rpmapache-tomcat-6.0..tar.gzjdk-6u3-linux-i.binmod_jk-1.2.-apache-2.2.x-linux-i.so官方宣称mod_jk-1.2.-httpd-2.2.

标签: apache2.4.46配置

本文链接地址:https://www.jiuchutong.com/biancheng/359223.html 转载请保留说明!

上一篇:apache如何禁止使用IP访问(apache禁用trace方法)

下一篇:Linux系统Jsp的环境:Apache,Tomcat配置(jsp环境变量配置的步骤)

  • 水电费专用发票税率
  • 审计报告印花标
  • 家属机票怎么办理
  • 运输设备折旧费用科目
  • 退休工资要缴纳税吗
  • 小规模公司核定增收税可以公账直接打给法人吗?
  • 没取得发票付款的情况该如何做账呢?
  • 同城酒店怎么开发票
  • 分公司税务是独立核算还是非独立
  • 多开了一张电子发票怎么办
  • 超市开发票要交百分之几的税?
  • 增值税发票如何读入金税盘
  • 总资产周转率计算公式用不用乘100%
  • 公司注销有哪些原因
  • 新企业残保金免交三年超过30人
  • 自产农产品销售怎么做账
  • 固定资产折旧可以不留残值吗
  • 普通合伙企业个税怎么算
  • 红字增值税发票含税吗
  • 前期认证相符且不符合
  • 事业单位发放的工作经费计入哪个科目
  • 支付外汇代扣代缴增值税
  • 公司商品房出售流程
  • 股票退市怎样补仓
  • 补助是按基本工资还是总工资
  • 如何找装修公司
  • 外贸企业出口退税账务处理
  • 农产品收购发票使用范围
  • 财务清算的作用
  • 增值税专用发票有几联?
  • geeklink 极联科技
  • windows 11 build 21996.1 dev
  • wordpress的文章在数据库里吗?
  • php时间计算
  • php数据结构
  • 销货方开具红票,购货方怎么入账
  • vue怎么做兼容
  • 应付现金股利通过
  • 进项发票认证后怎么做账
  • laravel框架的优缺点
  • 没有综合所得的经营所得如何预扣预缴个税
  • 职工探亲如何报差旅费
  • 下乡扶贫有补助吗
  • 管理费用二级科目明细可以自己设置吗
  • 试用产品的账务处理分录
  • 服务费发票需要交印花税吗
  • 固定资产折旧计算方法公式大全
  • 商贸公司成本大吗
  • 资产减值准备的计提影响递延所得税资产吗
  • 发票普通发票
  • 冲去年管理费用
  • 税收滞纳金什么意思
  • 其他人挂靠公司交社保会计处理怎么做?
  • 财务收入支出明细表
  • 投资性房地产用三栏式吗
  • 收据大写后面的字怎么写
  • 公司购入二手车没有发票怎么入账
  • 结账时应当结出每个账户的期末余额对吗
  • 游戏里区和服的区分
  • mac安装mysql的两种方法(含配置)
  • deepin 2014系统下安装mysql数据库的方法步骤
  • win7怎么装win8系统
  • freebsd重置密码
  • win功能下载所需文件
  • 电脑系统信息怎么关闭
  • win10在哪里找
  • win10 预览版 移除 tab 栏 特性
  • win10各个版本的桌面
  • 扫描仪在哪儿
  • win7打开网页显示证书有问题
  • linux shell脚本命令
  • java多线程产生死锁
  • 安装node-sass报错
  • python井字游戏
  • 如何动态加载外部文件
  • 河北华盛税务师事务所
  • 政府采购合同模板
  • 西安二手房几年可以过户
  • 国税车购税征收标准
  • 个人所得税年申报与月申报区别
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设