apache

LDAP authentication with apache2

Posted on February 29, 2008. Filed under: apache, Linux, SLES | Tags: , , , , |

Well, needed to setup authentication using mod_auth_ldap, here’s the procedure.

(more…)

Read Full Post | Make a Comment ( None so far )

Enforce HTTPS usage

Posted on September 29, 2007. Filed under: apache, Linux, SLES | Tags: |

Want to enforce SSL usage on apache2?, after having it working you only need a few mod_rewrite lines. In the case of SLES9/10, create a file /etc/apache2/conf.d/enforce.conf with the following content:

# Se indica a apache que todas las conexiones al puerto 80 deben ir al puerto 433, sin excepciones/This forces SSL usage without exceptions
<IfModule !mod_rewrite.c>
LoadModule rewrite_module /usr/lib/apache2-prefork/mod_rewrite.so
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
# La siguiente linea indica la condicion para mod_rewrite / mod_rewrite condition
ReWriteCond %{SERVER_PORT} !^443$
# Regla en caso de que la condicion anterior sea verdadera / rule applied in case the above condition is true
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</IfModule>

The exact path to mod_rewrite module can be found with “rpm -ql apache2|grep rewrite”. Now restart apache (rcapache2 restart)

Read Full Post | Make a Comment ( 1 so far )

  • Blog Stats

    • 29,171 hits
  • Visitors/Visitantes

  • Twitter Updates

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Liked it here?
Why not try sites on the blogroll...