Differences between revisions 2 and 3
Revision 2 as of 2006-05-17 16:44:15
Size: 2180
Editor: GrantSmith
Revision 3 as of 2009-09-20 23:01:17
Size: 2180
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Apache Server Configuration (Solaris Zone)

* The zone comes with apache2 already available * Follow the initial setup instructions from the ASF zone page (http://www.apache.org/dev/solaris-zones.html) * Create a SMF manifest for apache (so it can run as a service)

# mkdir /var/svc/manifest/application/web # vi /var/svc/manifest/application/web/apache.xml

* Add the following text

<?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">

<service_bundle type='manifest' name='apache'>

<service name='application/web/apache' type='service' version='1'>

  • <create_default_instance enabled="true"/> <single_instance />


    • name='filesystem' grouping='require_all' restart_on='none'

      type='service'> <service_fmri value='svc:/system/filesystem/local' />



    • type='method' name='start' exec='/usr/apache2/bin/apachectl start'

      timeout_seconds='120' />


    • type='method' name='stop' exec='/usr/apache2/bin/apachectl stop'

      timeout_seconds='120' />


    • type='method' name='restart' exec='/usr/apache2/bin/apachectl restart'

      timeout_seconds='120' />

    <stability value='Unstable' />


    • <common_name>

      • <loctext xml:lang='C'>Apache2(httpd)</loctext>

      </common_name> <documentation>

      • <manpage title='httpd' section='8'/>



</service> </service_bundle>

* Verify the validity of the xml file (command should run with no errors)

# svccfg -v validate apache.xml

* If you get a cryptic parse error you can try running the following to track it down

# xmllint --valid apache.xml

* Now import the manifest

# svccfg -v import apache.xml

* Check that the service was added (it should show it as disabled)

# svcs -v apache

* Now enable the service

# svcadm enable apache

* Verify that everything is started

# svcs -v apache should show enabled

* Check http://myfaces.zones.apache.org/

Apache_Server (last edited 2009-09-20 23:01:17 by localhost)