New in Apache HTTP Server 2.4 – Authorization, FCGI Proxy, and Mod_SSL

The authorization container directives <RequireAll>, <RequireAny> and <RequireNone> may be combined with each other and with the Require directive to express complex authorization logic.

The example below expresses the following authorization logic. In order to access the resource, the user must either be the superadmin user, or belong to both the admins group and the Administrators LDAP group and either belong to the sales group or have the LDAP dept attribute sales. Furthermore, in order to access the resource, the user must not belong to either the temps group or the LDAP group Temporary Employees.

<Directory /www/mydocs>

<RequireAll>

<RequireAny>

Require user superadmin
<RequireAll>

Require group admins
Require ldap-group cn=Administrators,o=Airius
<RequireAny>


Require group sales
Require ldap-attribute dept="sales"

</RequireAny>

</RequireAll>

</RequireAny>
<RequireNone>

Require group temps
Require ldap-group cn=Temporary Employees,o=Airius

</RequireNone>


</RequireAll>

</Directory>
Read More New in Apache HTTP Server 2.4 – Authorization, FCGI Proxy, and Mod_SSL

Advertisements

Python working on Apache

mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals.

Adding permission to serve the htdocs directory

In some (sane) Linux distributions (like SuSE 9.0) serving directories other than the
document-root “/srv/www/htdocs” with Apache is switched off by default for
security reasons in “/etc/httpd/httpd.conf” (or for Apache2 “/etc/apache2/httpd.conf”):

# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>

To allow Apache to serve directories outside of the document root you have to add these
lines to “/etc/httpd/httpd.conf” (in SuSE it is recommended to create a new “http.conf.local” and
include this file in “/etc/sysconfig/apache2”):

Alias /wiki/ "/usr/share/moin/htdocs/"
<Directory "/usr/share/moin/htdocs/">
Order deny,allow
Allow from all
</Directory>
ScriptAlias /mywiki "/usr/share/moin/mywiki/cgi-bin/moin.cgi"
<Directory "/usr/share/moin/mywiki/cgi-bin">
Order deny,allow
Allow from all
</Directory>

Read More Python working on Apache

htaccess tips

htaccess Guide Sections htaccess tricks for Webmasters HTTP Header control with htaccess mod_php or php as a cgi with htaccess tips, htaccess php tricks SEO Redirects without mod_rewrite mod_rewrite tips and tricks with RewriteEngine, RewriteBase, RewriteRule, and RewriteCond Caching, cache-control, cache, expires, and optimizing htaccess htaccess from the Apache htaccess tutorial. Check out and use… Read More htaccess tips