server{} Block Converting the server{} block from Sun WebServer 1.0 to Sun WebServer 2.1 format is relatively straightforward. Most of the directives in 1.0 are the same in 2.1, 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.
acl_enable directive Search for the following Sun WebServer 1.0 directive in /etc/http/httpd.conf:
acl_enable yes |
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.1. All mime types must be specified in the mime.types file at either the server or site level.
mime_add directive Given the following Sun WebServer 1.0 directive:
server {
mime_add "image/.jpeg" "JPG"
}
|
Make sure a mime.types file is specified in /etc/http/server1.httpd.conf:
If this file is shared among all the servers, changes will effect all httpd daemons
server {
mime_file "/etc/http/mime.types
}
|
Add the new MIME mappings to the /etc/http/mime.types file:
image/jpeg JPG |
server{} Block Conversion 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
}
|
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"
}
|
Add the MIME mapping to the /etc/http/mime.types file specified in (2):
image/jpeg JPG |