Sun Java System Web Server 6.1 SP11 Administrator's Guide

Enabling .htaccess from magnus.conf

To manually enable your sever to use the .htaccess, you first need to modify the server’s magnus.conf file to load, initialize, and activate the plug-in.

ProcedureTo manually enable your server to use the .htaccess

  1. Access the magnus.conffile in the server_root/https-server_name/config directory.

  2. After the other Init directives, add the following lines:

    • For UNIX/Linux:

      Init fn=”load-modules” funcs=”htaccess-init,htaccess-find”shlib=”server_root/plugins/htaccess/htaccess.so” NativeThread=”no”Init fn=”htaccess-init”

    • For Windows:

      Init fn=”load-modules” funcs=”htaccess-init,htaccess-find,htaccess-register”shlib=”server_root/plugins/htaccess/htaccess.dll” NativeThread=”no”Init fn=”htaccess-init”

    • For HP:

      Initfn=”load-modules” funcs=”htaccess-init,htaccess-find,htaccess-register” shlib=”<server_root>/plugins/htaccess/htaccess.sl” NativeThread=”no”

      Init fn=”htaccess-init”

  3. (Optional) Make the final line should read:

    Init fn=”htaccess-init”[groups-with-users=yes]

  4. Click Save from the File menu.

  5. Open obj.conf.

  6. Add the PathCheck directive as the last directive in the object.

    1. To activate .htaccess file processing for all directories managed by a virtual server, add the PathCheck directive to the default object in the object.conf file:

      <Object name="default">

      ...

      PathCheck fn="htaccess-find"

      </Object>

      .htaccess processing should be the last PathCheck directive in the object.

    2. To activate .htaccess file processing for particular server directories, place the PathCheck directive in the corresponding definition in magnus.conf.

  7. To name your .htaccess files something other than .htaccess, you must specify the filename in the PathCheck directive using the following format:

    PathCheck fn="htaccess-find" filename="filename"


    Note –

    The next time you use the Administration Server, you are warned that manual edits have been applied. Click Apply to accept your changes.


    Subsequent access to the server is subject to .htaccess access control in the specified directories. For example, to restrict write access to .htaccess files, create a configuration style for them, and apply access control to that configuration style. For more information, see Chapter 17, Applying Configuration Styles.