简体   繁体   中英

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

New to Apache, and suffering...

Seems to be true:

  • the default configuration is in Apache directory 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.
  • 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"
  • What will happen to the default configuration file if the -f option is used. 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?

Can someone confirm or deny?

Is there a well known site with a good introduction on setting up Apache, if possible on Windows. I found the Apache documentation a little bit difficult, and Apache Definitive Guide not clear about this kind of questions.

I was new to Apache 2 months ago, and still suffering. Since you got no replies from pros yet, I'll chip in my 2 cents: (all for 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. The default would be, in my case at least, in /etc/apache2/apache2.conf
    • you can have a bunch of other conf files. 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.

Don't know about the rest. Hope it helps you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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