HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Adding modules to Apache2 (http://www.howtoforge.com/forums/showthread.php?t=6044)

stealth 7th August 2006 04:39

Adding modules to Apache2
 
I have a SUSE 10.1 server with ISPConfig, Apache2, MYSQL5,PHP5, Postfix and proftpd. I would like to know how to install the mod_access module into apache2 without breaking it.

Thanks in advance.

falko 8th August 2006 17:59

I think it should already be installed. Isn't it in your Apache configuration? If not, then use yast and search for an appropriate package.

stealth 17th August 2006 02:59

How would I go about adding mod_access to apache2 using YAST. mod_access does not seem to be installed.

falko 18th August 2006 15:04

Run
Code:

yast
and go to Software -> Software Management and use the search function.

stealth 21st August 2006 05:31

I have been unable to find mod_access using yast. Yast told me it couldn't find mod_access. It looks like the install mirror i'm using doesn't have mod_access. Does anyone know any mirrors that has mod_access on it?.

themachine 21st August 2006 07:29

mod_access is very standard. Are you certain this is not included already? I am not certain of where the files are located/laid out in SuSE but in RedHat it is loaded by default in '/etc/httpd/conf/httpd.conf':

Code:

[root@vs03 /]# cat /etc/httpd/conf/httpd.conf | grep -i mod_access
LoadModule access_module modules/mod_access.so

If you don't find it there, grep everything for it:


Code:

[root@vs03 /]# grep -ri "mod_access" /etc/httpd/*
/etc/httpd/build/config_vars.mk:MOD_ACCESS_LDFLAGS =
/etc/httpd/build/config_vars.mk:MOD_ACCESS_LIBS =
/etc/httpd/conf/httpd.conf:LoadModule access_module modules/mod_access.so
Binary file /etc/httpd/modules/mod_access.so matches


If the configuration is not there, but the 'mod_access.so' module is, then simply add the configuration to load it:

Code:

LoadModule access_module </path/to/modules/dir/mod_access.so

stealth 21st August 2006 08:51

mod_access.so file doesn't exist so I would need to install it and it doesn't appear in any config files.

themachine 21st August 2006 09:31

http://apache.hoxt.com/tomcat/tomcat...eployer.tar.gz


I have a hard time believing that mod_access is not available... even by default. Have you tried to even use the directives for mod_access?

Setup a basic directive to test it:

Code:

<Directory "/path/to/some/directory">
    Order Deny,Allow
    Deny from all
</Directory>


After restarting Apache, acess to the Directory should be denid. If it is... Waallllaaaa mod_access is already enabled. If it doesn't, you should see something in the Error Log or even when restarting Apache.

Otherwise... you'll need to read the documentation for SuSE as I haven't run it for a long time. Any other distro has mod_access enabled by default... so I think you may be over looking something.

stealth 21st August 2006 10:06

Ok in that case mod_access is installed and working.

I would like to have a directory on one of the virtual websites to be able deny access to the public and only allow access from the internal network. I would like to be able to do this using .htaccess file.

falko 22nd August 2006 14:04

Try this in your .htaccess file:

Code:

Order Deny,Allow
Deny from all
Allow from Allow from 192.168.0.0/255.255.255.0

Of course, you must change the network settings in there to your needs. :)


All times are GMT +2. The time now is 04:48.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.