我的httpd.conf是空的

编程入门 行业动态 更新时间:2024-10-27 22:33:53
本文介绍了我的httpd.conf是空的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近安装在Ubuntu的Apache2,但我有一个问题,我的httpd.conf是空的。有人可以给我的httpd.conf一个干净的副本在Ubuntu的Apache2?谢谢!

I recently installed apache2 on ubuntu but I have a problem, my httpd.conf is empty. Can someone give me a clean copy of httpd.conf for apache2 on ubuntu? Thanks!

编辑:我看到你的答案,但是,wampserver httpd.conf中是不是空的,因为你提到它是用户的选择。所以我该怎么做?

I saw your answers but on wampserver httpd.conf is not empty and as you mentioned it is for user options. SO what should I do?

EDIT2:这就是我对我的apache2.conf了,我该怎么添加模块,启用gzip和所有的

Edit2 : That's what I got on my apache2.conf, how I add modules, enable gzip and all of that?

的 [删除的内容,因为它们使问题无法读取和是无用的,因为这是在Ubuntu下默认的Apache2配置。] 的

推荐答案

的 /etc/apache2/httpd.conf 是在Ubuntu空的,因为Apache配置驻留在 /etc/apache2/apache2.conf中!

The /etc/apache2/httpd.conf is empty in Ubuntu, because the Apache configuration resides in /etc/apache2/apache2.conf!

httpd.conf文件是用户的选择。不,不,这是有历史原因。

使用 Apache服务器,所有的用户选项应该进入一个新的 * CONF 在 /etc/apache2/conf.d / 。这种方法应该是更新安全,为的httpd.conf 或 apache2.conf 可能会在下一个覆盖服务器更新。

Using Apache server, all user options should go into a new *.conf-file inside /etc/apache2/conf.d/. This method should be "update-safe", as httpd.conf or apache2.conf may get overwritten on the next server update.

在 /etc/apache2/apache2.conf中,你会发现下面的线,其中包括这些文件:

Inside /etc/apache2/apache2.conf, you will find the following line, which includes those files:

# Include generic snippets of statements Include conf.d/

由于的Apache 2.4 + 用户配置目录为在/ etc / apache2的/ conf目录可用/ 。使用 a2enconf FILENAME_WITHOUT_SUFFIX 来启用新的配置文件或手动创建符号链接的/ etc / apache2的/启用的conf-/ 。请注意,例如Apache 2.4的配置文件必须具有后缀 .conf文件(如 CONF可用/我-settings.conf );

As of Apache 2.4+ the user configuration directory is /etc/apache2/conf-available/. Use a2enconf FILENAME_WITHOUT_SUFFIX to enable the new configuration file or manually create a symlink in /etc/apache2/conf-enabled/. Be aware that as of Apache 2.4 the configuration files must have the suffix .conf (e.g. conf-available/my-settings.conf);

更多推荐

我的httpd.conf是空的

本文发布于:2023-07-16 04:04:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1117663.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:httpd   conf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!