简体   繁体   English

XP 上的 Apache 2.2:如何管理配置文件? 它们应该位于哪里?

[英]Apache 2.2 on XP: How configuration files are managed? Where should they be located?

New to Apache, and suffering... Apache 新手,受苦...

Seems to be true:似乎是真的:

  • the default configuration is in Apache directory Apache2.2/conf/httpd.conf默认配置在 Apache 目录Apache2.2/conf/httpd.conf

Unsure of that :不确定

  • it can be elsewhere它可以在其他地方
  • to create some separation between test/production, it seems that the best option is to store all test files, including configuration and logs, in the same directory, with subdirectories conf, log, htdocs, and all production files in another directory using a similar structure.为了在测试/生产之间创建一些分离,似乎最好的选择是将所有测试文件(包括配置和日志)存储在同一目录中,子目录 conf、log、htdocs 和所有生产文件使用类似的目录存储在另一个目录中结构体。
  • if my upper directory is d:mywww , then the server needs to be started with the associated configuration file, eg httpd -f "d:mywww/conf/httpd.conf"如果我的上层目录是d:mywww ,则需要使用关联的配置文件启动服务器,例如httpd -f "d:mywww/conf/httpd.conf"
  • What will happen to the default configuration file if the -f option is used.如果使用 -f 选项,默认配置文件会发生什么。 Will it be ignored?会被忽略吗?
  • If instead of the -f option, you use httpd -d "d:mywww/htdocs" to indicate the directory to serve, but not any configuration file, will the default config file be used and the one under d:mywww/conf ignored?如果不使用 -f 选项,而是使用httpd -d "d:mywww/htdocs"来指示要服务的目录,而不是任何配置文件,将使用默认配置文件并忽略d:mywww/conf下的配置文件?

Can someone confirm or deny?有人可以确认或否认吗?

Is there a well known site with a good introduction on setting up Apache, if possible on Windows.如果可能的话,是否有一个众所周知的站点对设置 Apache 有很好的介绍,如果可能的话,在 Windows 上。 I found the Apache documentation a little bit difficult, and Apache Definitive Guide not clear about this kind of questions.我发现 Apache 文档有点困难,而 Apache Definitive Guide 并不清楚这类问题。

I was new to Apache 2 months ago, and still suffering. 2 个月前,我是 Apache 的新手,仍然受苦。 Since you got no replies from pros yet, I'll chip in my 2 cents: (all for Ubuntu 10.10)由于您还没有收到专业人士的回复,我将投入 2 美分:(全部用于 Ubuntu 10.10)

  • httpd.conf is used for your personal configurations, so I'd say that it is not the default configuration file as you specify. httpd.conf 用于您的个人配置,所以我想说它不是您指定的默认配置文件。 The default would be, in my case at least, in /etc/apache2/apache2.conf至少在我的情况下,默认值是在 /etc/apache2/apache2.conf
    • you can have a bunch of other conf files.你可以有一堆其他的conf文件。 In my case, I can place any file with an extension.conf inside /etc/apache2/conf.d/ and it will be picked up by Apache on restart.就我而言,我可以将任何带有 extension.conf 的文件放在 /etc/apache2/conf.d/ 中,Apache 会在重新启动时拾取它。

Don't know about the rest.不知道rest。 Hope it helps you希望对你有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM