我的httpd.conf是空的 [英] My httpd.conf is empty

查看:637
本文介绍了我的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是空的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆