1 #
   2 # CDDL HEADER START
   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 
  27 #
  28 # "$Id: httpd-standalone-ipp.conf,v 1.4 2006/03/24 00:26:54 njacobs Exp $"
  29 #
  30 
  31 # ident "%Z%%M% %I%     %E% SMI"
  32 
  33 ##
  34 ## httpd-standalone-ipp.conf -- Apache HTTP server configuration file for
  35 ##      an Internet Print Protocol (IPP) listener
  36 ##
  37 
  38 #
  39 # Based upon the NCSA server configuration files originally by Rob McCool.
  40 #
  41 # This is the main Apache server configuration file.  It contains the
  42 # configuration directives that give the server its instructions.
  43 # See <URL:http://www.apache.org/docs/> for detailed information about
  44 # the directives.  mod_ipp specific directives are described in the
  45 # mod_ipp(4) man page.
  46 #
  47 
  48 ### Section 1: Global Environment
  49 #
  50 # The directives in this section affect the overall operation of Apache,
  51 # such as the number of concurrent requests it can handle or where it
  52 # can find its configuration files.
  53 #
  54 
  55 #
  56 # ServerRoot: The top of the directory tree under which the server's
  57 # configuration, error, and log files are kept.
  58 #
  59 # NOTE!  If you intend to place this on an NFS (or otherwise network)
  60 # mounted filesystem then please read the LockFile documentation
  61 # (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
  62 # you will save yourself a lot of trouble.
  63 #
  64 ServerRoot "/usr/apache2/2.2"
  65 
  66 #
  67 # The LockFile directive sets the path to the lockfile used when Apache
  68 # is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
  69 # USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
  70 # its default value. The main reason for changing it is if the logs
  71 # directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
  72 # DISK. The PID of the main server process is automatically appended to
  73 # the filename. 
  74 #
  75 #LockFile /var/run/httpd.lock
  76 LockFile /var/run/httpd-standalone-ipp.lock
  77 
  78 #
  79 # PidFile: The file in which the server should record its process
  80 # identification number when it starts.
  81 #
  82 PidFile /var/run/httpd-standalone-ipp.pid
  83 
  84 #
  85 # ScoreBoardFile: File used to store internal server process information.
  86 # Not all architectures require this.  But if yours does (you'll know because
  87 # this file will be  created when you run Apache) then you *must* ensure that
  88 # no two invocations of Apache share the same scoreboard file.
  89 #
  90 ScoreBoardFile /var/run/httpd-standalone-ipp.scoreboard
  91 
  92 #
  93 # In the standard configuration, the server will process httpd.conf (this 
  94 # file, specified by the -f command line option), srm.conf, and access.conf 
  95 # in that order.  The latter two files are now distributed empty, as it is 
  96 # recommended that all directives be kept in a single file for simplicity.  
  97 # The commented-out values below are the built-in defaults.  You can have the 
  98 # server ignore these files altogether by using "/dev/null" (for Unix) or
  99 # "nul" (for Win32) for the arguments to the directives.
 100 #
 101 #ResourceConfig conf/srm.conf
 102 #AccessConfig conf/access.conf
 103 
 104 #
 105 # Timeout: The number of seconds before receives and sends time out.
 106 #
 107 Timeout 300
 108 
 109 #
 110 # KeepAlive: Whether or not to allow persistent connections (more than
 111 # one request per connection). Set to "Off" to deactivate.
 112 #
 113 KeepAlive On
 114 
 115 #
 116 # MaxKeepAliveRequests: The maximum number of requests to allow
 117 # during a persistent connection. Set to 0 to allow an unlimited amount.
 118 # We recommend you leave this number high, for maximum performance.
 119 #
 120 MaxKeepAliveRequests 100
 121 
 122 #
 123 # KeepAliveTimeout: Number of seconds to wait for the next request from the
 124 # same client on the same connection.
 125 #
 126 KeepAliveTimeout 15
 127 
 128 #
 129 # Server-pool size regulation.  Rather than making you guess how many
 130 # server processes you need, Apache dynamically adapts to the load it
 131 # sees --- that is, it tries to maintain enough server processes to
 132 # handle the current load, plus a few spare servers to handle transient
 133 # load spikes (e.g., multiple simultaneous requests from a single
 134 # Netscape browser).
 135 #
 136 # It does this by periodically checking how many servers are waiting
 137 # for a request.  If there are fewer than MinSpareServers, it creates
 138 # a new spare.  If there are more than MaxSpareServers, some of the
 139 # spares die off.  The default values are probably OK for most sites.
 140 #
 141 MinSpareServers 1
 142 MaxSpareServers 2
 143 
 144 #
 145 # Number of servers to start initially --- should be a reasonable ballpark
 146 # figure.
 147 #
 148 StartServers 1
 149 
 150 #
 151 # Limit on total number of servers running, i.e., limit on the number
 152 # of clients who can simultaneously connect --- if this limit is ever
 153 # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
 154 # It is intended mainly as a brake to keep a runaway server from taking
 155 # the system with it as it spirals down...
 156 #
 157 MaxClients 150
 158 
 159 #
 160 # MaxRequestsPerChild: the number of requests each child process is
 161 # allowed to process before the child dies.  The child will exit so
 162 # as to avoid problems after prolonged use when Apache (and maybe the
 163 # libraries it uses) leak memory or other resources.  On most systems, this
 164 # isn't really needed, but a few (such as Solaris) do have notable leaks
 165 # in the libraries. For these platforms, set to something like 10000
 166 # or so; a setting of 0 means unlimited.
 167 #
 168 # NOTE: This value does not include keepalive requests after the initial
 169 #       request per connection. For example, if a child process handles
 170 #       an initial request and 10 subsequent "keptalive" requests, it
 171 #       would only count as 1 request towards this limit.
 172 #
 173 MaxRequestsPerChild 10
 174 
 175 #
 176 # Dynamic Shared Object (DSO) Support
 177 #
 178 # To be able to use the functionality of a module which was built as a DSO you
 179 # have to place corresponding `LoadModule' lines at this location so the
 180 # directives contained in it are actually available _before_ they are used.
 181 # Please read the file http://httpd.apache.org/docs/dso.html for more
 182 # details about the DSO mechanism and run `httpd -l' for the list of already
 183 # built-in (statically linked and thus always available) modules in your httpd
 184 # binary.
 185 #
 186 # Note: The order in which modules are loaded is important.  Don't change
 187 # the order below without expert advice.
 188 #
 189 LoadModule alias_module libexec/mod_alias.so
 190 LoadModule auth_basic_module libexec/mod_auth_basic.so
 191 LoadModule authn_file_module libexec/mod_authn_file.so
 192 LoadModule authz_host_module libexec/mod_authz_host.so
 193 LoadModule authz_user_module libexec/mod_authz_user.so
 194 LoadModule mime_module libexec/mod_mime.so
 195 LoadModule mime_magic_module libexec/mod_mime_magic.so
 196 LoadModule ipp_module libexec/mod_ipp.so
 197 
 198 ### Section 2: 'Main' server configuration
 199 #
 200 # The directives in this section set up the values used by the 'main'
 201 # server, which responds to any requests that aren't handled by a
 202 # <VirtualHost> definition.  These values also provide defaults for
 203 # any <VirtualHost> containers you may define later in the file.
 204 #
 205 # All of these directives may appear inside <VirtualHost> containers,
 206 # in which case these default settings will be overridden for the
 207 # virtual host being defined.
 208 #
 209 
 210 #
 211 # If your ServerType directive (set earlier in the 'Global Environment'
 212 # section) is set to "inetd", the next few directives don't have any
 213 # effect since their settings are defined by the inetd configuration.
 214 # Skip ahead to the ServerAdmin directive.
 215 #
 216 
 217 #
 218 # Port: The port to which the standalone server listens. For
 219 # ports < 1023, you will need httpd to be run as root initially.
 220 #
 221 Listen 631
 222 
 223 #
 224 # If you wish httpd to run as a different user or group, you must run
 225 # httpd as root initially and it will switch.  
 226 #
 227 # User/Group: The name (or #number) of the user/group to run httpd as.
 228 #  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
 229 #  . On HPUX you may not be able to use shared memory as nobody, and the
 230 #    suggested workaround is to create a user www and use that user.
 231 #  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
 232 #  when the value of (unsigned)Group is above 60000; 
 233 #  don't use Group nobody on these systems!
 234 #
 235 User lp
 236 Group lp
 237 
 238 #
 239 # ServerAdmin: Your address, where problems with the server should be
 240 # e-mailed.  This address appears on some server-generated pages, such
 241 # as error documents.
 242 #
 243 ServerAdmin lp@localhost
 244 
 245 #
 246 # ServerName allows you to set a host name which is sent back to clients for
 247 # your server if it's different than the one the program would get (i.e., use
 248 # "www" instead of the host's real name).
 249 #
 250 # Note: You cannot just invent host names and hope they work. The name you 
 251 # define here must be a valid DNS name for your host. If you don't understand
 252 # this, ask your network administrator.
 253 # If your host doesn't have a registered DNS name, enter its IP address here.
 254 # You will have to access it by its address (e.g., http://123.45.67.89/)
 255 # anyway, and this will make redirections work in a sensible way.
 256 #
 257 # 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your 
 258 # machine always knows itself by this address. If you use Apache strictly for 
 259 # local testing and development, you may use 127.0.0.1 as the server name.
 260 #
 261 #Servername printserver.some_company.com
 262 
 263 DefaultType application/ipp
 264 
 265 ErrorLog        /var/lp/logs/ipp-errors
 266 LogLevel        warn
 267 
 268 DocumentRoot /var/lp/ipp-listener
 269 
 270 # Allow passing PPD files from this service as well
 271 Alias /etc/lp/ppd/ /etc/lp/ppd/
 272 <Directory /etc/lp/ppd>
 273         SetHandler send-as-is
 274         <LimitExcept GET>
 275                 Deny from all
 276         </LimitExcept>
 277 </Directory>
 278 
 279 # mod_ipp specific configuration
 280 <IfModule mod_ipp.c>
 281 
 282         <Location />
 283                 # ipp-conformance automatic     # default
 284                 # ipp-default-user nobody
 285                 ipp-default-service lpsched
 286                 #
 287                 # By default, only turn on operations that are not
 288                 # likely to cause real problems when the user can't
 289                 # be trusted.
 290                 #
 291                 ipp-operation all off
 292                 ipp-operation print-job on
 293                 ipp-operation validate-job on
 294                 ipp-operation create-job on
 295                 ipp-operation get-jobs on
 296                 ipp-operation get-printer-attributes on
 297                 ipp-operation send-document on
 298                 ipp-operation cancel-job on
 299                 ipp-operation get-job-attributes on
 300                 ipp-operation cups-get-default on
 301                 ipp-operation cups-get-printers on
 302                 ipp-operation cups-get-classes on
 303                 ipp-operation cups-move-job on
 304 
 305                 # redirect non-IPP requests
 306                 ErrorDocument 404 /index.html
 307         </Location>
 308 
 309         <Location /admin>
 310                 # ipp-conformance automatic     # default
 311                 # ipp-default-user nobody
 312                 ipp-default-service lpsched
 313 
 314                 ipp-operation all on
 315 
 316                 AuthType Basic
 317                 AuthName "IPP Server"
 318                 AuthUserFile /etc/ipp-users
 319                 Require valid-user
 320 
 321                 # redirect non-IPP requests
 322                 ErrorDocument 404 /index.html
 323         </Location>
 324 </IfModule>
 325