[CLUG-tech] Radius and Virtual Hosts in apache

Michael Wood michael at frogfoot.com
Wed Dec 19 14:18:21 SAST 2007


On Wed, Dec 19, 2007 at 01:37:36PM +0200, Jongilanga Guma wrote:
> Hello,
> I am trying to setup Radius with Apache 2.2.4 running on Ubuntu GNU
> Linux but  get "AddRadiusAuth "not allowed here" when I do a test
> config.

Based on this:

http://www.freeradius.org/mod_auth_radius/httpd.conf

it looks like the AddRadiusAuth should be at the top level, instead of
inside a <Location> section.

> I uncomment.
> LoadModule auth_basic_module modules/mod_auth_basic.so
> LoadModule authn_file_module modules/mod_authn_file.so
> And addded
> LoadModule radius_auth_module modules/mod_auth_radius.so
> 
> 
> Below is my Apache configuration:
> 
> <VirtualHost *>
> 	ServerName jongi.za.net
> 	ServerAlias www.jongi.za.net
> 	
> 	<Directory />
> 		Order deny,allow
> 		Allow from all
> 	
> 	</Directory>
> 	
> 	<Location "/restricted/">
> 		# AddRadiusAuth server[:port] <shared-secret> [ timeout [ : retries ]]
>     		AddRadiusAuth localhost:1792 testSecret 5:3
[...]
> 	</Location>
> 	
> </VirtualHost>
> 
> Please shed some light,

Maybe this will work:

LoadModule radius_auth_module modules/mod_auth_radius.so
AddRadiusAuth localhost:1792 testSecret 5:3

<VirtualHost *>
	ServerName jongi.za.net
	ServerAlias www.jongi.za.net
	
	<Directory />
		Order deny,allow
		Allow from all
	</Directory>
	
	<Location "/restricted/">
    		AuthType Basic
    		AuthName "RADIUS authentication for localhost"
    		AuthRadiusAuthoritative on
    		AuthRadiusCookieValid 5
    		AuthRadiusActive On
                Require valid-user
	</Location>
</VirtualHost>

-- 
Michael Wood <michael at frogfoot.com>


More information about the clug-tech mailing list