Where is this file?

Hello, I was reading a guide about Apache but running on another operating system, so I am trying to do the same, but on FreeBSD of course. Problem is that I can not find this: /etc/apache2/mods-available/dir.conf.
 
It's probably one of the "extra" configuration files in /usr/local/etc/apache22/extra/. They can be included from /usr/local/etc/apache22/httpd.conf.
 
SirDice said:
It's probably one of the "extra" configuration files in /usr/local/etc/apache22/extra/. They can be included from /usr/local/etc/apache22/httpd.conf.

You mean that dir.conf is the same as httpd.conf[]?
 
adripillo said:
You mean that dir.conf is same that httpd.conf ?
No, it's probably one of these:
Code:
dice@vps-2417-1:~> ll /usr/local/etc/apache22/extra/
total 44
-rw-r--r--  1 root  wheel   2855 Jun 17 16:41 httpd-autoindex.conf
-rw-r--r--  1 root  wheel   1678 Jun 17 16:41 httpd-dav.conf
-rw-r--r--  1 root  wheel   2344 Nov 26  2011 httpd-default.conf
-rw-r--r--  1 root  wheel   1103 Jun 17 16:41 httpd-info.conf
-rw-r--r--  1 root  wheel   5078 Jun 17 16:41 httpd-languages.conf
-rw-r--r--  1 root  wheel    926 Jun 17 16:41 httpd-manual.conf
-rw-r--r--  1 root  wheel   3797 Jun 17 16:41 httpd-mpm.conf
-rw-r--r--  1 root  wheel   2201 Jun 17 16:41 httpd-multilang-errordoc.conf
-rw-r--r--  1 root  wheel  11002 Jun 17 16:41 httpd-ssl.conf
-rw-r--r--  1 root  wheel    968 Jun 17 16:41 httpd-userdir.conf
-rw-r--r--  1 root  wheel   1493 Jun 17 16:41 httpd-vhosts.conf

They can be included from httpd.conf:
Code:
# Supplemental configuration
#
# The configuration files in the etc/apache22/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# Server-pool management (MPM specific)
#Include etc/apache22/extra/httpd-mpm.conf

# Multi-language error messages
#Include etc/apache22/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include etc/apache22/extra/httpd-autoindex.conf

# Language settings
#Include etc/apache22/extra/httpd-languages.conf

# User home directories
#Include etc/apache22/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include etc/apache22/extra/httpd-info.conf

# Virtual hosts
#Include etc/apache22/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include etc/apache22/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include etc/apache22/extra/httpd-dav.conf

# Various default settings
Include etc/apache22/extra/httpd-default.conf

If it's none of those you can add it to /usr/local/etc/apache22/extra/ and include it in httpd.conf.
 
adripillo said:
You mean that dir.conf is the same as httpd.conf?

All those files are just one httpd.conf split into various files in ways depending on the OS/packager/port maintainer opinion. The reason to do this is easier maintenance and better compliance with the given OS/distribution configuration policy.

On FreeBSD several sections are put into files in the /usr/local/etc/apache22/extra/ directory and included in the main config on user will as @SirDice stated, at least Debian use a form with the /etc/apache/mods-available/ directory and symlinking wanted files into the /etc/apache/mods-enabled/ directory etc.

Basically, don't care about files, configuration directives are important. Select those ones, which do what you want and put them either into the /usr/local/etc/apache22/httpd.conf file or create your own configuration file under the /usr/local/etc/apache22/Includes/ directory and make sure, that your config file contains (and enables) the directive
Code:
Include etc/apache22/Includes/*.conf
 
Last edited by a moderator:
Back
Top