notas:apache
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
| notas:apache [2011/02/25 14:18] – cayu | notas:apache [2015/11/20 17:54] (actual) – cayu | ||
|---|---|---|---|
| Línea 32: | Línea 32: | ||
| + | ===== Auto Autenticar Usuario ===== | ||
| + | A veces necesitamos que cierta aplicación web o un directorio en particular crea que esta autenticado con " | ||
| + | |||
| + | |||
| + | < | ||
| + | RewriteBase / | ||
| + | RewriteRule / | ||
| + | </ | ||
| ===== Redireccionar de HTTP a HTTPS ===== | ===== Redireccionar de HTTP a HTTPS ===== | ||
| Línea 39: | Línea 47: | ||
| RewriteCond %{HTTPS} off | RewriteCond %{HTTPS} off | ||
| RewriteRule (.*) https:// | RewriteRule (.*) https:// | ||
| + | </ | ||
| + | |||
| + | ===== Autenticacion LDAP ===== | ||
| + | |||
| + | Fragmento de configuración para Nagios | ||
| + | |||
| + | < | ||
| + | LDAPSharedCacheSize 200000 | ||
| + | LDAPCacheEntries 1024 | ||
| + | LDAPCacheTTL 600 | ||
| + | LDAPOpCacheEntries 1024 | ||
| + | LDAPOpCacheTTL 600 | ||
| + | |||
| + | ScriptAlias / | ||
| + | |||
| + | < | ||
| + | SSLRequireSSL | ||
| + | Options ExecCGI | ||
| + | AllowOverride None | ||
| + | Order allow,deny | ||
| + | Allow from all | ||
| + | AuthType | ||
| + | AuthName | ||
| + | AuthBasicProvider ldap | ||
| + | AuthLDAPURL " | ||
| + | AuthLDAPURL " | ||
| + | AuthLDAPBindDN uid=ldapadmin, | ||
| + | AuthLDAPBindPassword 123456 | ||
| + | Require valid-user | ||
| + | Require group cn=linux-admin, | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Autenticacion contra dos LDAP diferentes ===== | ||
| + | |||
| + | < | ||
| + | < | ||
| + | AuthLDAPBindDN usuarioconsulta@dominio.net | ||
| + | AuthLDAPBindPassword password | ||
| + | AuthLDAPURL ldap:// | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | AuthLDAPBindDN usuarioconsulta@segundodominio.net | ||
| + | AuthLDAPBindPassword password | ||
| + | AuthLDAPURL ldap:// | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | CustomLog ${APACHE_LOG_DIR}/ | ||
| + | ErrorLog ${APACHE_LOG_DIR}/ | ||
| + | SSLEngine on | ||
| + | SSLCertificateFile / | ||
| + | SSLCertificateKeyFile / | ||
| + | |||
| + | ServerName | ||
| + | ServerAlias | ||
| + | |||
| + | DocumentRoot / | ||
| + | |||
| + | < | ||
| + | AuthBasicProvider ldap-dominio ldap-segundodominio | ||
| + | AuthType Basic | ||
| + | AuthName LDAP_Protected_Place | ||
| + | AuthzLDAPAuthoritative off | ||
| + | AuthName "Wiki Access" | ||
| + | Options All | ||
| + | Order allow,deny | ||
| + | Allow from all | ||
| + | SSLRequireSSL | ||
| + | AllowOverride None | ||
| + | Require valid-user | ||
| + | </ | ||
| + | </ | ||
| </ | </ | ||
| ===== Seguridad ===== | ===== Seguridad ===== | ||
| - | En el blog sherekan http:// | ||
| **/ | **/ | ||
| Línea 99: | Línea 182: | ||
| expose_php = Off | expose_php = Off | ||
| </ | </ | ||
| + | |||
| + | ==== Mod Security ==== | ||
| + | |||
| + | Mod Security es un módulo de Apache, que mediante del filtrado de los distintos métodos HTTP (GET, POST, etc) adquiere un comportamiento de Firewall Web, filtrando ataques potenciales a nuestros sitios web. | ||
| + | |||
| + | < | ||
| + | apt-get install libapache-mod-security | ||
| + | a2enmod mod-security | ||
| + | </ | ||
| + | **/ | ||
| + | < | ||
| + | ServerTokens Full | ||
| + | SecServerSignature Servidor HTTP Blablabla 7.0 | ||
| + | </ | ||
| + | |||
| + | ==== Mod SSL ==== | ||
| + | |||
| + | En la siguiente página wiki se pueden encontrar algunos tips de [[notas: | ||
| + | |||
| + | ===== Calcular Apache prefork ===== | ||
| + | |||
| + | * Determinar RAM disponible para Apache | ||
| + | * Determinar RAM usada por proceso de Apache | ||
| + | * MaxClients en concordancia con (RAM disponible para Apache) / (RAM usada por proceso Apache) | ||
| + | |||
| + | MaxClients: ((Total_Memory)(1024)(MB) - Other_processes_memory) / 73 | ||
| + | |||
| + | For Example: I have 16 GB RAM, I might leave free 2 GB for any other processes | ||
| + | |||
| + | MaxClients: ((16*1024) - 2048) / 73 | ||
| + | MaxClient: 196 | ||
| + | |||
| + | |||
| + | http:// | ||
| + | |||
| + | https:// | ||
| + | |||
notas/apache.1298643495.txt.gz · Última modificación: 2011/02/25 14:18 por cayu
