# Apache problem mod_authz_host



## vamos (Jun 11, 2013)

Hello, I have this problem:







I've tried to `make config` and `make reinstall` with mod_authz_host.so but it changed nothing.

An idea?


----------



## wblock@ (Jun 11, 2013)

Did you install Apache from ports or packages?  If ports, did you turn off any of the options, like AUTHZ_HOST?


----------



## vamos (Jun 11, 2013)

I've installed with ports and I've not modified any things.


----------



## ShelLuser (Jun 11, 2013)

Could you paste the output from these commands:

`# file /usr/local/libexec/apache22/mod_authz_host.so`

and

`# grep authz /usr/local/etc/apache22/httpd.conf`

That will give us some more clues to help find the cause of all this.


----------



## vamos (Jun 11, 2013)

First:

```
/usr/local/libexec/apache22/mod_authz_host.so: cannot open `/usr/local libexec/apache22/mod_authz_host.so' (No such file or directory)
```

Next:

```
LoadModule authz_host_module libexec/apache22/mod_authz_host.so
LoadModule authz_groupfile_module libexec/apache22/mod_authz_groupfile.so
LoadModule authz_dbm_module libexec/apache22/mod_authz_dbm.so
LoadModule authz_owner_module libexec/apache22/mod_authz_owner.so
LoadModule authz_default_module libexec/apache22/mod_authz_default.so
```


----------



## wblock@ (Jun 11, 2013)

The file has been deleted.  Figure out how that happened and prevent it.

Might you have switched to www/apache24?

If not, then reinstall www/apache22 with default options:

```
# cd /usr/ports/www/apache22
# make rmconfig
# make install clean (press Enter when the options screen is shown)
```


----------



## ShelLuser (Jun 11, 2013)

vamos said:
			
		

> ```
> /usr/local/libexec/apache22/mod_authz_host.so: cannot open `/usr/local libexec/apache22/mod_authz_host.so' (No such file or directory)
> ```


That output looks quite strange to me; notice how there's a space between local and libexec?

And another thing; when file can't access something it will make it quite clear that it has encountered an error:


```
smtp2:/home/peter $ file test
test: ERROR: cannot open `test' (No such file or directory)
```

Although the results don't change the conclusion which @wblock@ has already summed up it does look a bit peculiar making me wonder: where does the file command come from?

You might want to check with this command: `which file`. If that lists file to be located on /usr/bin/file then either you're using a completely different version than I'm familiar with, or something very wrong is going on.


----------



## wblock@ (Jun 11, 2013)

ShelLuser said:
			
		

> That output looks quite strange to me; notice how there's a space between local and libexec?



That's my fault, the original message had a huge bunch of spaces there, which I took to be a cut and paste problem and edited out.  Nearly edited out, anyway.


----------



## vamos (Jun 11, 2013)

wblock@ said:
			
		

> The file has been deleted.  Figure out how that happened and prevent it.
> 
> Might you have switched to www/apache24?
> 
> ...



It change nothing, I'm using www/apache22.


----------



## wblock@ (Jun 11, 2013)

Back to basics:
`% ls -lh /usr/local/libexec/apache22/mod_authz_host.so`


----------



## vamos (Jun 11, 2013)

```
ls: /usr/local/libexec/apache22/mod_authz_host.so: No such file or directory
```


----------



## wblock@ (Jun 11, 2013)

Please show the output of

```
% pkg_info -Ix apache
% make -C /usr/ports/www/apache22 showconfig
```


----------



## vamos (Jun 11, 2013)

```
# pkg_info -Ix apache
apache22-2.2.24     Version 2.2.x of Apache web server with prefork MPM.
# make -C /usr/ports/www/apache22 showconfig
===> The following configuration options are available for apache22-2.2.24:
     AUTH_BASIC=on: mod_auth_basic
     AUTH_DIGEST=on: mod_auth_digest
     AUTHN_ALIAS=on: mod_authn_alias
     AUTHN_ANON=on: mod_authn_anon
     AUTHN_DBD=off: mod_authn_dbd
     AUTHN_DBM=on: mod_authn_dbm
     AUTHN_DEFAULT=on: mod_authn_default
     AUTHN_FILE=on: mod_authn_file
     AUTHZ_DBM=on: mod_authz_dbm
     AUTHZ_DEFAULT=on: mod_authz_default
     AUTHZ_GROUPFILE=on: mod_authz_groupfile
     AUTHZ_HOST=on: mod_authz_host
     AUTHZ_OWNER=on: mod_authz_owner
     AUTHZ_USER=on: mod_authz_user
     AUTHNZ_LDAP=off: mod_authnz_ldap
     LDAP=off: connection pooling, result caching
     DBD=off: Manages SQL database connections
     CACHE=on: mod_cache
     DISK_CACHE=on: mod_disk_cache
     FILE_CACHE=on: mod_file_cache
     MEM_CACHE=off: mod_mem_cache
     DAV=on: mod_dav
     DAV_FS=on: mod_dav_fs
     DAV_LOCK=off: mod_dav_lock
     ACTIONS=on: mod_actions
     ALIAS=on: mod_alias
     ASIS=on: mod_asis
     AUTOINDEX=on: mod_autoindex
     CERN_META=on: mod_cern_meta
     CGI=on: mod_cgi
     CGID=off: mod_cgid
     CHARSET_LITE=on: mod_charset_lite
     DEFLATE=on: mod_deflate
     DIR=on: mod_dir
     DUMPIO=on: mod_dumpio
     ENV=on: mod_env
     EXPIRES=on: mod_expires
     HEADERS=on: mod_headers
     IMAGEMAP=on: mod_imagemap
     INCLUDE=on: mod_include
     INFO=on: mod_info
     LOG_CONFIG=on: mod_log_config
     LOGIO=on: mod_logio
     MIME=on: mod_mime
     MIME_MAGIC=on: mod_mime_magic
     NEGOTIATION=on: mod_negotiation
     REWRITE=on: mod_rewrite
     SETENVIF=on: mod_setenvif
     SPELING=on: mod_speling
     STATUS=on: mod_status
     UNIQUE_ID=on: mod_unique_id
     USERDIR=on: mod_userdir
     USERTRACK=on: mod_usertrack
     VHOST_ALIAS=on: mod_vhost_alias
     FILTER=on: mod_filter
     SUBSTITUTE=off: mod_substitute
     VERSION=on: mod_version
     SSL=on: mod_ssl
     SUEXEC=off: mod_suexec
     SUEXEC_RSRCLIMIT=off: suEXEC rlimits based on login class
     SUEXEC_USERDIR=off: suEXEC UserDir support
     REQTIMEOUT=on: mod_reqtimeout
     PROXY=off: mod_proxy
     IPV4_MAPPED=off: Allow IPv6 socket to handle IPv4
     BUCKETEER=off: mod_bucketeer
     CASE_FILTER=off: mod_case_filter
     CASE_FILTER_IN=off: mod_case_filter_in
     EXT_FILTER=off: mod_ext_filter
     LOG_FORENSIC=off: mod_log_forensic
     OPTIONAL_HOOK_EXPORT=off: mod_optional_hook_export
     OPTIONAL_HOOK_IMPORT=off: mod_optional_hook_import
     OPTIONAL_FN_IMPORT=off: mod_optional_fn_import
     OPTIONAL_FN_EXPORT=off: mod_optional_fn_export
====> Options available for the multi PROXY: you have to choose at least one of them
     PROXY_AJP=off: mod_proxy_ajp
     PROXY_BALANCER=off: mod_proxy_balancer
     PROXY_CONNECT=off: mod_proxy_connect
     PROXY_FTP=off: mod_proxy_ftp
     PROXY_HTTP=off: mod_proxy_http
     PROXY_SCGI=off: mod_proxy_scgi
===> Use 'make config' to modify these settings
```


----------



## wblock@ (Jun 11, 2013)

And finally, do this:

```
# cd /usr/ports/www/apache22
# make deinstall clean
# make install clean
# service apache22 restart
```


----------



## vamos (Jun 11, 2013)

Problem solved, thanks.


----------

