Apache - Auth según dominio
<Directory /home/user/datos/www/luismido.es/>
        Options -Indexes FollowSymLinks MultiViews
        AllowOverride all

        # set the "require_auth" var if Host starts with "www"
        SetEnvIfNoCase Host ^www\.luismido\.es$ require_auth=true

        # Auth stuff
        AuthUserFile ".........../passwords"
        AuthName "luismido.es"
        AuthType Digest

        # Setup a deny/allow
        Order Deny,Allow
        # Deny from everyone
        Deny from all
        # except if either of these are satisfied
        Satisfy any
        # 1. a valid authenticated user
        Require valid-user
        # or 2. the "require_auth" var is NOT set
        Allow from env=!require_auth

        ErrorDocument 401 /errorPages/401.html

        RewriteEngine on

        RewriteCond %{HTTP_HOST} !^www\.luismido\.es [NC]
        RewriteRule ^(.*)$ http://www.luismido.es/$1 [R=301]

<Directory /home/user/datos/www/luismido.es/errorPages/>
        Allow from all
        Satisfy Any

« Linux

Si no se indica lo contrario, el contenido de esta página se ofrece bajo Creative Commons Attribution-ShareAlike 3.0 License