xref: /titanic_41/usr/src/lib/print/mod_ipp/httpd-standalone-ipp.conf (revision 2208104ea4cd6d9d44c2a0c21cf2479b92aacf08)
1355b4669Sjacobs#
2355b4669Sjacobs# CDDL HEADER START
3355b4669Sjacobs#
4355b4669Sjacobs# The contents of this file are subject to the terms of the
5355b4669Sjacobs# Common Development and Distribution License (the "License").
6355b4669Sjacobs# You may not use this file except in compliance with the License.
7355b4669Sjacobs#
8355b4669Sjacobs# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9355b4669Sjacobs# or http://www.opensolaris.org/os/licensing.
10355b4669Sjacobs# See the License for the specific language governing permissions
11355b4669Sjacobs# and limitations under the License.
12355b4669Sjacobs#
13355b4669Sjacobs# When distributing Covered Code, include this CDDL HEADER in each
14355b4669Sjacobs# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15355b4669Sjacobs# If applicable, add the following below this CDDL HEADER, with the
16355b4669Sjacobs# fields enclosed by brackets "[]" replaced with your own identifying
17355b4669Sjacobs# information: Portions Copyright [yyyy] [name of copyright owner]
18355b4669Sjacobs#
19355b4669Sjacobs# CDDL HEADER END
20355b4669Sjacobs#
21355b4669Sjacobs
22355b4669Sjacobs#
23355b4669Sjacobs# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24355b4669Sjacobs# Use is subject to license terms.
25355b4669Sjacobs#
26355b4669Sjacobs
27355b4669Sjacobs#
28355b4669Sjacobs# "$Id: httpd-standalone-ipp.conf,v 1.4 2006/03/24 00:26:54 njacobs Exp $"
29355b4669Sjacobs#
30355b4669Sjacobs
31355b4669Sjacobs##
32355b4669Sjacobs## httpd-standalone-ipp.conf -- Apache HTTP server configuration file for
33355b4669Sjacobs##	an Internet Print Protocol (IPP) listener
34355b4669Sjacobs##
35355b4669Sjacobs
36355b4669Sjacobs#
37355b4669Sjacobs# Based upon the NCSA server configuration files originally by Rob McCool.
38355b4669Sjacobs#
39355b4669Sjacobs# This is the main Apache server configuration file.  It contains the
40355b4669Sjacobs# configuration directives that give the server its instructions.
41355b4669Sjacobs# See <URL:http://www.apache.org/docs/> for detailed information about
42355b4669Sjacobs# the directives.  mod_ipp specific directives are described in the
43355b4669Sjacobs# mod_ipp(4) man page.
44355b4669Sjacobs#
45355b4669Sjacobs
46355b4669Sjacobs### Section 1: Global Environment
47355b4669Sjacobs#
48355b4669Sjacobs# The directives in this section affect the overall operation of Apache,
49355b4669Sjacobs# such as the number of concurrent requests it can handle or where it
50355b4669Sjacobs# can find its configuration files.
51355b4669Sjacobs#
52355b4669Sjacobs
53355b4669Sjacobs#
54355b4669Sjacobs# ServerRoot: The top of the directory tree under which the server's
55355b4669Sjacobs# configuration, error, and log files are kept.
56355b4669Sjacobs#
57355b4669Sjacobs# NOTE!  If you intend to place this on an NFS (or otherwise network)
58355b4669Sjacobs# mounted filesystem then please read the LockFile documentation
59355b4669Sjacobs# (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
60355b4669Sjacobs# you will save yourself a lot of trouble.
61355b4669Sjacobs#
62*2208104eSGordon Ross# Change /usr/apache2/... if Apache 2.x is elsewhere.
63*2208104eSGordon RossServerRoot "/usr/apache2/2.2"
64355b4669Sjacobs
65355b4669Sjacobs#
66355b4669Sjacobs# The LockFile directive sets the path to the lockfile used when Apache
67355b4669Sjacobs# is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
68355b4669Sjacobs# USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
69355b4669Sjacobs# its default value. The main reason for changing it is if the logs
70355b4669Sjacobs# directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
71355b4669Sjacobs# DISK. The PID of the main server process is automatically appended to
72355b4669Sjacobs# the filename.
73355b4669Sjacobs#
74355b4669Sjacobs#LockFile /var/run/httpd.lock
75355b4669SjacobsLockFile /var/run/httpd-standalone-ipp.lock
76355b4669Sjacobs
77355b4669Sjacobs#
78355b4669Sjacobs# PidFile: The file in which the server should record its process
79355b4669Sjacobs# identification number when it starts.
80355b4669Sjacobs#
81355b4669SjacobsPidFile /var/run/httpd-standalone-ipp.pid
82355b4669Sjacobs
83355b4669Sjacobs#
84355b4669Sjacobs# ScoreBoardFile: File used to store internal server process information.
85355b4669Sjacobs# Not all architectures require this.  But if yours does (you'll know because
86355b4669Sjacobs# this file will be  created when you run Apache) then you *must* ensure that
87355b4669Sjacobs# no two invocations of Apache share the same scoreboard file.
88355b4669Sjacobs#
89355b4669SjacobsScoreBoardFile /var/run/httpd-standalone-ipp.scoreboard
90355b4669Sjacobs
91355b4669Sjacobs#
92355b4669Sjacobs# In the standard configuration, the server will process httpd.conf (this
93355b4669Sjacobs# file, specified by the -f command line option), srm.conf, and access.conf
94355b4669Sjacobs# in that order.  The latter two files are now distributed empty, as it is
95355b4669Sjacobs# recommended that all directives be kept in a single file for simplicity.
96355b4669Sjacobs# The commented-out values below are the built-in defaults.  You can have the
97355b4669Sjacobs# server ignore these files altogether by using "/dev/null" (for Unix) or
98355b4669Sjacobs# "nul" (for Win32) for the arguments to the directives.
99355b4669Sjacobs#
100355b4669Sjacobs#ResourceConfig conf/srm.conf
101355b4669Sjacobs#AccessConfig conf/access.conf
102355b4669Sjacobs
103355b4669Sjacobs#
104355b4669Sjacobs# Timeout: The number of seconds before receives and sends time out.
105355b4669Sjacobs#
106355b4669SjacobsTimeout 300
107355b4669Sjacobs
108355b4669Sjacobs#
109355b4669Sjacobs# KeepAlive: Whether or not to allow persistent connections (more than
110355b4669Sjacobs# one request per connection). Set to "Off" to deactivate.
111355b4669Sjacobs#
112355b4669SjacobsKeepAlive On
113355b4669Sjacobs
114355b4669Sjacobs#
115355b4669Sjacobs# MaxKeepAliveRequests: The maximum number of requests to allow
116355b4669Sjacobs# during a persistent connection. Set to 0 to allow an unlimited amount.
117355b4669Sjacobs# We recommend you leave this number high, for maximum performance.
118355b4669Sjacobs#
119355b4669SjacobsMaxKeepAliveRequests 100
120355b4669Sjacobs
121355b4669Sjacobs#
122355b4669Sjacobs# KeepAliveTimeout: Number of seconds to wait for the next request from the
123355b4669Sjacobs# same client on the same connection.
124355b4669Sjacobs#
125355b4669SjacobsKeepAliveTimeout 15
126355b4669Sjacobs
127355b4669Sjacobs#
128355b4669Sjacobs# Server-pool size regulation.  Rather than making you guess how many
129355b4669Sjacobs# server processes you need, Apache dynamically adapts to the load it
130355b4669Sjacobs# sees --- that is, it tries to maintain enough server processes to
131355b4669Sjacobs# handle the current load, plus a few spare servers to handle transient
132355b4669Sjacobs# load spikes (e.g., multiple simultaneous requests from a single
133355b4669Sjacobs# Netscape browser).
134355b4669Sjacobs#
135355b4669Sjacobs# It does this by periodically checking how many servers are waiting
136355b4669Sjacobs# for a request.  If there are fewer than MinSpareServers, it creates
137355b4669Sjacobs# a new spare.  If there are more than MaxSpareServers, some of the
138355b4669Sjacobs# spares die off.  The default values are probably OK for most sites.
139355b4669Sjacobs#
140355b4669SjacobsMinSpareServers 1
141355b4669SjacobsMaxSpareServers 2
142355b4669Sjacobs
143355b4669Sjacobs#
144355b4669Sjacobs# Number of servers to start initially --- should be a reasonable ballpark
145355b4669Sjacobs# figure.
146355b4669Sjacobs#
147355b4669SjacobsStartServers 1
148355b4669Sjacobs
149355b4669Sjacobs#
150355b4669Sjacobs# Limit on total number of servers running, i.e., limit on the number
151355b4669Sjacobs# of clients who can simultaneously connect --- if this limit is ever
152355b4669Sjacobs# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
153355b4669Sjacobs# It is intended mainly as a brake to keep a runaway server from taking
154355b4669Sjacobs# the system with it as it spirals down...
155355b4669Sjacobs#
156355b4669SjacobsMaxClients 150
157355b4669Sjacobs
158355b4669Sjacobs#
159355b4669Sjacobs# MaxRequestsPerChild: the number of requests each child process is
160355b4669Sjacobs# allowed to process before the child dies.  The child will exit so
161355b4669Sjacobs# as to avoid problems after prolonged use when Apache (and maybe the
162355b4669Sjacobs# libraries it uses) leak memory or other resources.  On most systems, this
163355b4669Sjacobs# isn't really needed, but a few (such as Solaris) do have notable leaks
164355b4669Sjacobs# in the libraries. For these platforms, set to something like 10000
165355b4669Sjacobs# or so; a setting of 0 means unlimited.
166355b4669Sjacobs#
167355b4669Sjacobs# NOTE: This value does not include keepalive requests after the initial
168355b4669Sjacobs#       request per connection. For example, if a child process handles
169355b4669Sjacobs#       an initial request and 10 subsequent "keptalive" requests, it
170355b4669Sjacobs#       would only count as 1 request towards this limit.
171355b4669Sjacobs#
172355b4669SjacobsMaxRequestsPerChild 10
173355b4669Sjacobs
174355b4669Sjacobs#
175355b4669Sjacobs# Dynamic Shared Object (DSO) Support
176355b4669Sjacobs#
177355b4669Sjacobs# To be able to use the functionality of a module which was built as a DSO you
178355b4669Sjacobs# have to place corresponding `LoadModule' lines at this location so the
179355b4669Sjacobs# directives contained in it are actually available _before_ they are used.
180355b4669Sjacobs# Please read the file http://httpd.apache.org/docs/dso.html for more
181355b4669Sjacobs# details about the DSO mechanism and run `httpd -l' for the list of already
182355b4669Sjacobs# built-in (statically linked and thus always available) modules in your httpd
183355b4669Sjacobs# binary.
184355b4669Sjacobs#
185355b4669Sjacobs# Note: The order in which modules are loaded is important.  Don't change
186355b4669Sjacobs# the order below without expert advice.
187355b4669Sjacobs#
188355b4669SjacobsLoadModule alias_module libexec/mod_alias.so
189*2208104eSGordon RossLoadModule auth_basic_module libexec/mod_auth_basic.so
190*2208104eSGordon RossLoadModule authn_file_module libexec/mod_authn_file.so
191*2208104eSGordon RossLoadModule authz_host_module libexec/mod_authz_host.so
192*2208104eSGordon RossLoadModule authz_user_module libexec/mod_authz_user.so
193355b4669SjacobsLoadModule mime_module libexec/mod_mime.so
194355b4669SjacobsLoadModule mime_magic_module libexec/mod_mime_magic.so
195*2208104eSGordon RossLoadModule ipp_module /usr/lib/lp/ipp/mod_ipp.so
196355b4669Sjacobs
197355b4669Sjacobs### Section 2: 'Main' server configuration
198355b4669Sjacobs#
199355b4669Sjacobs# The directives in this section set up the values used by the 'main'
200355b4669Sjacobs# server, which responds to any requests that aren't handled by a
201355b4669Sjacobs# <VirtualHost> definition.  These values also provide defaults for
202355b4669Sjacobs# any <VirtualHost> containers you may define later in the file.
203355b4669Sjacobs#
204355b4669Sjacobs# All of these directives may appear inside <VirtualHost> containers,
205355b4669Sjacobs# in which case these default settings will be overridden for the
206355b4669Sjacobs# virtual host being defined.
207355b4669Sjacobs#
208355b4669Sjacobs
209355b4669Sjacobs#
210355b4669Sjacobs# If your ServerType directive (set earlier in the 'Global Environment'
211355b4669Sjacobs# section) is set to "inetd", the next few directives don't have any
212355b4669Sjacobs# effect since their settings are defined by the inetd configuration.
213355b4669Sjacobs# Skip ahead to the ServerAdmin directive.
214355b4669Sjacobs#
215355b4669Sjacobs
216355b4669Sjacobs#
217355b4669Sjacobs# Port: The port to which the standalone server listens. For
218355b4669Sjacobs# ports < 1023, you will need httpd to be run as root initially.
219355b4669Sjacobs#
220*2208104eSGordon RossListen 631
221355b4669Sjacobs
222355b4669Sjacobs#
223355b4669Sjacobs# If you wish httpd to run as a different user or group, you must run
224355b4669Sjacobs# httpd as root initially and it will switch.
225355b4669Sjacobs#
226355b4669Sjacobs# User/Group: The name (or #number) of the user/group to run httpd as.
227355b4669Sjacobs#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
228355b4669Sjacobs#  . On HPUX you may not be able to use shared memory as nobody, and the
229355b4669Sjacobs#    suggested workaround is to create a user www and use that user.
230355b4669Sjacobs#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
231355b4669Sjacobs#  when the value of (unsigned)Group is above 60000;
232355b4669Sjacobs#  don't use Group nobody on these systems!
233355b4669Sjacobs#
234355b4669SjacobsUser lp
235355b4669SjacobsGroup lp
236355b4669Sjacobs
237355b4669Sjacobs#
238355b4669Sjacobs# ServerAdmin: Your address, where problems with the server should be
239355b4669Sjacobs# e-mailed.  This address appears on some server-generated pages, such
240355b4669Sjacobs# as error documents.
241355b4669Sjacobs#
242355b4669SjacobsServerAdmin lp@localhost
243355b4669Sjacobs
244355b4669Sjacobs#
245355b4669Sjacobs# ServerName allows you to set a host name which is sent back to clients for
246355b4669Sjacobs# your server if it's different than the one the program would get (i.e., use
247355b4669Sjacobs# "www" instead of the host's real name).
248355b4669Sjacobs#
249355b4669Sjacobs# Note: You cannot just invent host names and hope they work. The name you
250355b4669Sjacobs# define here must be a valid DNS name for your host. If you don't understand
251355b4669Sjacobs# this, ask your network administrator.
252355b4669Sjacobs# If your host doesn't have a registered DNS name, enter its IP address here.
253355b4669Sjacobs# You will have to access it by its address (e.g., http://123.45.67.89/)
254355b4669Sjacobs# anyway, and this will make redirections work in a sensible way.
255355b4669Sjacobs#
256355b4669Sjacobs# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
257355b4669Sjacobs# machine always knows itself by this address. If you use Apache strictly for
258355b4669Sjacobs# local testing and development, you may use 127.0.0.1 as the server name.
259355b4669Sjacobs#
260355b4669Sjacobs#Servername printserver.some_company.com
261355b4669Sjacobs
262355b4669SjacobsDefaultType application/ipp
263355b4669Sjacobs
264355b4669SjacobsErrorLog	/var/lp/logs/ipp-errors
265355b4669SjacobsLogLevel	warn
266355b4669Sjacobs
267355b4669SjacobsDocumentRoot /var/lp/ipp-listener
268355b4669Sjacobs
269355b4669Sjacobs# Allow passing PPD files from this service as well
270355b4669SjacobsAlias /etc/lp/ppd/ /etc/lp/ppd/
271355b4669Sjacobs<Directory /etc/lp/ppd>
272355b4669Sjacobs	SetHandler send-as-is
273355b4669Sjacobs	<LimitExcept GET>
274355b4669Sjacobs		Deny from all
275355b4669Sjacobs	</LimitExcept>
276355b4669Sjacobs</Directory>
277355b4669Sjacobs
278355b4669Sjacobs# mod_ipp specific configuration
279355b4669Sjacobs<IfModule mod_ipp.c>
280355b4669Sjacobs
281355b4669Sjacobs	<Location />
282355b4669Sjacobs		# ipp-conformance automatic     # default
283355b4669Sjacobs		# ipp-default-user nobody
284355b4669Sjacobs		ipp-default-service lpsched
285355b4669Sjacobs		#
286355b4669Sjacobs		# By default, only turn on operations that are not
287355b4669Sjacobs		# likely to cause real problems when the user can't
288355b4669Sjacobs		# be trusted.
289355b4669Sjacobs		#
290355b4669Sjacobs		ipp-operation all off
291355b4669Sjacobs		ipp-operation print-job on
292355b4669Sjacobs		ipp-operation validate-job on
293355b4669Sjacobs		ipp-operation create-job on
294355b4669Sjacobs		ipp-operation get-jobs on
295355b4669Sjacobs		ipp-operation get-printer-attributes on
296355b4669Sjacobs		ipp-operation send-document on
297355b4669Sjacobs		ipp-operation cancel-job on
298355b4669Sjacobs		ipp-operation get-job-attributes on
299355b4669Sjacobs		ipp-operation cups-get-default on
300355b4669Sjacobs		ipp-operation cups-get-printers on
301355b4669Sjacobs		ipp-operation cups-get-classes on
302355b4669Sjacobs		ipp-operation cups-move-job on
303355b4669Sjacobs
304355b4669Sjacobs		# redirect non-IPP requests
305355b4669Sjacobs		ErrorDocument 404 /index.html
306355b4669Sjacobs	</Location>
307355b4669Sjacobs
308355b4669Sjacobs	<Location /admin>
309355b4669Sjacobs		# ipp-conformance automatic     # default
310355b4669Sjacobs		# ipp-default-user nobody
311355b4669Sjacobs		ipp-default-service lpsched
312355b4669Sjacobs
313*2208104eSGordon Ross		# To be more restrictive, use this intead:
314*2208104eSGordon Ross		# ipp-operation required on
315355b4669Sjacobs		ipp-operation all on
316355b4669Sjacobs
317355b4669Sjacobs		AuthType Basic
318355b4669Sjacobs		AuthName "IPP Server"
319355b4669Sjacobs		AuthUserFile /etc/ipp-users
320355b4669Sjacobs		Require valid-user
321355b4669Sjacobs
322355b4669Sjacobs		# redirect non-IPP requests
323355b4669Sjacobs		ErrorDocument 404 /index.html
324355b4669Sjacobs	</Location>
325355b4669Sjacobs</IfModule>
326