手册页部分 1M: 系统管理命令

退出打印视图

更新时间: 2014 年 7 月
 
 

apache2 (1m)

名称

apache2 - Apache HTTP Server Version 2 overview

用法概要

apache2

描述




System Administration Commands                        apache2(1M)



NAME
     apache2 - Apache HTTP Server Version 2 overview

SYNOPSIS
     apache2


DESCRIPTION
     Apache  HTTP  Server Version 2 (Apache 2) consists of a main
     server daemon, loadable  server  modules,   some  additional
     support utilities, configuration files, and documentation.


     Both   32-bit   and  64-bit  versions  of  the  servers  are
     installed. It also includes two of the most popular  MPMs  -
     Prefork and Worker.

     Apache  2  can be enabled by authorized user within the ser-
     vice management facility (SMF), using  the  following  fault
     management resource identifier (FMRI):

       svc:/network/http:apache22

     Available SMF properties are listed in the following table:

     +-----------------------------------------------+-----------------------------+
     |           SMF Property Name^Value             |                             |
     +-----------------------------------------------+-----------------------------+
     |httpd/server_type^prefork (default) or worker  |                             |
     +-----------------------------------------------+-----------------------------+
     |httpd/enable_64bit^true or false(default)      |                             |
     +-----------------------------------------------+-----------------------------+
     |httpd/startup_options^valid apachectl options  |                             |
     +-----------------------------------------------+-----------------------------+
FILES
     The  following  files specify the installation locations for
     Apache 2:

     Note :

         o    The  string  [version]  should   be   expanded   to
              "MAJOR.MINOR". For example, /usr/apache2/2.2/*.

         o    [isainfo]  represents  the  output of isainfo -n on
              64-bit platform.

         o    To find the current version of Apache  2  installed
              on your machine, type the following command:

                $ /usr/apache2/[version]/bin/apachectl -v





SunOS 5.12            Last change: May 2013                     1






System Administration Commands                        apache2(1M)



     /etc/apache2/[version]/

         Contains  server  configuration files. A newly-installed
         server contains a default httpd.conf file. This  is  the
         main configuration file.

         If  there  is  need  to use different main configuration
         file (e.g. to run multiple  Apache  2  instances),  it's
         possible  by  providing Apache '-f' option via SMF prop-
         erty httpd/startup_options.


     /etc/apache2/[version]/conf.d/

         Contains additional server configuration files.

         By default, server will load all the .conf files  placed
         under  this  directory.  It  also has 2 additional .load
         configuration files-modules-32.load and  modules-64.load
         which  contain  LoadModule directives for loading the 32
         and 64-bit bundled Apache 2 modules respectively.


     /etc/apache2/[version]/envvars

         File for specifying the environment settings  which  the
         server  uses  at startup. This is the user-editable ver-
         sion of the /usr/apache2/[version]/bin/envvars file.

         Note that this is default path to envvars file  only  in
         case  where  main  configuration  file  is  in directory
         /etc/apache2/[version]/2.2/. If this  is  not  the  case
         Apache  2  will look for envvars file in the same direc-
         tory where is main configuration file.


     /etc/apache2/[version]/magic

         Magic data for mod_mime_magic  Apache  module  as  docu-
         mented in the
         /usr/apache2/2.2/manual/mod/mod_mime_magic.html file.
         Editing this file is not recommended.


     /etc/apache2/[version]/mime.types

         Default MIME types file. This file sets the default list
         of mappings from filename extensions to  content  types,
         changing  this  file is not recommended. Use the AddType
         directive instead.





SunOS 5.12            Last change: May 2013                     2






System Administration Commands                        apache2(1M)



     /etc/apache2/[version]/original/

         Contents under this directory are delivered  as-is  from
         the apache distribution and these files are not meant to
         be read by the server.


     /etc/apache2/[version]/sample-conf.d/

         Contains sample .conf files. These are not  included  in
         the  main  configuration  file.  To use the sample file,
         copy the file to conf.d directory and modify as per  the
         need.


     /usr/apache2/[version]/bin/

         Contains the 32-bit httpd (Prefork MPM) and httpd.worker
         (Worker MPM) executable as well as  other  utility  pro-
         grams.


     /usr/apache2/[version]/bin/[isainfo]/

         Contains the 64-bit httpd (Prefork MPM) and httpd.worker
         (Worker MPM) executables as well as other  utility  pro-
         grams.


     /usr/apache2/[version]/bin/envvars /usr/apache2/[ver-
     sion]/bin/[isainfo]/envvars

         Contains  the  default  environment  settings  that  the
         server uses at startup.
         Editing this file is not recommended.
         Instead,  user should use /etc/apache2/[version]/envvars
         file.


     /usr/apache2/[version]/manual/

         Contains the Apache 2 manual in HTML format.


     /usr/apache2/[version]/include/

         Contains the Apache 2 header files, which are needed for
         building   various   optional   server  extensions  with
         apxs(8).






SunOS 5.12            Last change: May 2013                     3






System Administration Commands                        apache2(1M)



     /usr/apache2/[version]/libexec/

         Contains 32-bit loadable modules  (DSOs)  supplied  with
         the server.


     /usr/apache2/[version]/libexec/[isainfo]/

         Contains  64-bit  loadable  modules (DSOs) supplied with
         the server.


     /usr/apache2/[version]/man/

         Contains man pages for the server, utility programs, and
         mod_perl.

         Add  this directory to your MANPATH to read the Apache 2
         man pages. See Notes.


     /usr/apache2/[version]/lib/

         Contains the 32-bit Apache 2 core libraries.


     /usr/apache2/[version]/lib/[isainfo]/

         Contains the 64-bit Apache 2 core libraries.


     /usr/apache2/[version]/lib/perl/

         Contains the 32-bit modules and library  files  used  by
         the mod_perl extension to Apache 2.


     /var/apache2/[version]/cgi-bin/

         Default location for the CGI scripts.

         This  can be changed by altering the httpd.conf file and
         restarting the server.


     /var/apache2/[version]/htdocs/

         Default document root.

         This can be changed by altering the httpd.conf file  and
         restarting the server.




SunOS 5.12            Last change: May 2013                     4






System Administration Commands                        apache2(1M)



     /var/apache2/[version]/icons/

         Icons used by the server.

         This should not be changed.


     /var/apache2/[version]/libexec/

         Place holder for 32-bit user Apache 2 modules.

         Any  32-bit  modules  which  are added using apxs(8) are
         copied into this directory.


     /var/apache2/[version]/libexec/[isainfo]/

         Place holder for 64-bit user Apache 2 modules.

         Any 64-bit modules which are  added  using  apxs(8)  are
         copied into this directory.


     /var/apache2/[version]/logs/

         Contains server log files.

         The  formats,  names, and locations of the files in this
         directory can be altered by various configuration direc-
         tives in the httpd.conf file.


     /var/apache2/[version]/proxy/

         Directory used to cache pages if  the caching feature of
         mod_proxy is enabled in the httpd.conf file.

         The location of the cache can also be changed by  chang-
         ing the proxy configuration in the httpd.conf file.


EXAMPLES
     Example 1 To enable 64-bit server


       # svccfg -s apache22 setprop httpd/enable_64bit=false
       # svcadm refresh apache22
       # svcadm enable apache22







SunOS 5.12            Last change: May 2013                     5






System Administration Commands                        apache2(1M)



     Example 2 To switch to worker server type


       # svccfg -s apache22 setprop httpd/server_type=worker
       # svcadm refresh apache22
       # svcadm restart apache22



     Example 3 Create new SMF apache instance


     This  expects  that  valid configuration exists in /var/mya-
     pache/httpd.conf and it has altered all relevant  directives
     against default apache instance (e.g. PidFile, Listen, Docu-
     mentRoot, ErrorLog and CustomLog).

       # cp /lib/svc/manifest/network/http-apache22.xml my-apache22.xml

       Edit my-apache22.xml and rename instance name to my-apache22.

       # svccfg import my-apache22.xml
       # svccfg -s my-apache22 setprop 'httpd/startup_options=("-f" "/var/myapache/httpd.conf")'
       # svcadm refresh my-apache22




ATTRIBUTES
     See  attributes(5)  for  descriptions   of   the   following
     attributes:

     +---------------+----------------------+
     |ATTRIBUTE TYPE |   ATTRIBUTE VALUE    |
     +---------------+----------------------+
     |Availability   | web/server/apache-22 |
     +---------------+----------------------+
     |Stability      | Uncommitted          |
     +---------------+----------------------+
SEE ALSO
     attributes(5), httpd(8), apachectl(8)


     http://httpd.apache.org/docs/

NOTES
     In addition to the documentation and man pages included with
     Solaris,    more     information     is     available     at
     http://httpd.apache.org/.






SunOS 5.12            Last change: May 2013                     6






System Administration Commands                        apache2(1M)



     The  Apache  2  man  pages are provided with the programming
     modules. To view the manual pages for the Apache  2  modules
     with  the man command, add /usr/apache2/[version]/man to the
     MANPATH environment variable.  See man(1) for more  informa-
     tion. Running catman(1M) on the Apache 2 manual pages is not
     supported.


     This  software  was   built   from   source   available   at
     https://java.net/projects/solaris-userland.    The  original
     community   source   was   downloaded    from     http://ar-
     chive.apache.org/dist/httpd/httpd-2.2.27.tar.gz

     Further  information about this software can be found on the
     open source community website at http://httpd.apache.org/.








































SunOS 5.12            Last change: May 2013                     7