Sun WebServer Installation Guide

server{} Block

Converting the server{} block from Sun WebServer 1.0 to Sun WebServer 2.0 format is relatively straightforward. Most of the directives in 1.0 are the same in 2.0, with the following exceptions listed below:

acl_delegate_depth

The acl_delegate_depth directive, and the concept of delegation of access controls, is no longer supported in Sun WebServer. See "Migrating the Sun WebServer 1.0 access.acl File" in this document.

acl_enable

The acl_enable directive has been changed to access_enable.

To convert the acl_enable directive
  1. Search for the following Sun WebServer 1.0 directive in /etc/http/httpd.conf:


    acl_enable				yes
  2. Replace it in /etc/http/server1.httpd.conf with the following directive:


    access_enable 		yes

acl_file

The acl_file directive is no longer supported in the server{} block, because the server-level access control file is now configured to be: /etc/http/access.conf. This file name cannot be changed.

map

The map directive is no longer supported in the server{} block. All URL mappings must be made in a web site's map.conf file.

mime_add

The mime_add directive is no longer supported in Sun WebServer 2.0. All mime types must be specified in the mime.types file at either the server or site level.

To convert the mime_add directive
  1. Given the following Sun WebServer 1.0 directive:


    server {
    	mime_add			"image/.jpeg"			"JPG"
    }
  2. Make sure a mime.types file is specified in /etc/http/server1.httpd.conf:


    Note -

    If this file is shared among all the servers, changes will effect all httpd daemons



    server {
    	mime_file 			"/etc/http/mime.types
    }
  3. Add the new MIME mappings to the /etc/http/mime.types file:


    image/jpeg 			JPG

server{} Block Conversion
  1. Given the following Sun WebServer 1.0 server{} block in /etc/http/httpd.conf:


    server {
    	server_root							"/var/http/demo/"
    	server_user							"root"
    	mime_add										"image/jpeg"	"JPG"
    	mime_default_type	 text/html
    	acl_enable								"yes"
    	acl_file										"/etc/http/access.acl"
    	acl_delegate_depth			3
    
    	map			/cgi-bin/				/var/http/cgi-bin/			cgi	
    }
  2. Modify the server{} block in /etc/http/server1.httpd.conf:


    server {
    	server_root							"/var/http/demo/"
    	server_user							"http"
    	mime_file									"/etc/http/mime.types"
    	mime_default_type	 text/html
    	access_enable					"yes"
    }
  3. Add the MIME mapping to the /etc/http/mime.types file specified in (2):


    image/jpeg				JPG