{"id":197,"date":"2013-04-30T16:52:13","date_gmt":"2013-04-30T20:52:13","guid":{"rendered":"http:\/\/devopsny.com\/blog\/?p=197"},"modified":"2013-04-30T16:52:13","modified_gmt":"2013-04-30T20:52:13","slug":"apache2-on-solaris-10","status":"publish","type":"post","link":"https:\/\/devopsny.com\/blog\/2013\/04\/30\/apache2-on-solaris-10\/","title":{"rendered":"Apache2 on Solaris 10"},"content":{"rendered":"<p>The apache web server is included with Solaris 10. Follow these steps to enable it.<br \/>\nStep 1: Create a working default apache config file<\/p>\n<p>The apache server config files are in \/etc\/apache2. To quickly get up and running, you can just use the sample config file by doing the following:<\/p>\n<p>cd \/etc\/apache2 cp httpd.conf-example httpd.conf<\/p>\n<p>&nbsp;<\/p>\n<p>Step 2: Enable the apache\/httpd service<\/p>\n<p>Check to see if apache is already running:<\/p>\n<p>svcs -a | grep -i http<\/p>\n<p>You will probably see the following, indicating that apache is NOT running: disabled Apr_20 svc:\/network\/http:apache2<br \/>\nUse the svcadm command to start the webserver. This will also make it automatically start if your machine reboots. svcadm -v enable \/network\/http:apache2<\/p>\n<p>Use the following svcs command to make sure it worked: svcs -p \/network\/http:apache2 STATE STIME FMRI online 15:32:44 svc:\/network\/http:apache2<\/p>\n<pre>              15:32:44    28711 httpd\r\n              15:32:45    28712 httpd\r\n              15:32:45    28713 httpd\r\n              15:32:45    28714 httpd\r\n              15:32:45    28715 httpd\r\n              15:32:45    28716 httpd<\/pre>\n<p>This is showing that the webserver is online and working.<\/p>\n<p>&nbsp;<\/p>\n<p>Step 3: Add your web content<\/p>\n<p>Put your html (IE: index.html) in the \/var\/apache2\/htdocs directory. If everything went OK, you should have a functioning apache webserver.<br \/>\nDebugging \/ Troubleshooting<\/p>\n<p>If the svcs -p command from the above step doesn&#8217;t show a STATE of online, do the followig: svcs -a | grep -i http<\/p>\n<p>You&#8217;ll probably see that it&#8217;s in maintenance mode: maintenance 15:16:12 svc:\/network\/http:apache2<\/p>\n<p>For more detailed info run: svcs -l http<\/p>\n<p>OR svcs -x http svc:\/network\/http:apache2 (Apache 2 HTTP server)<\/p>\n<pre>State: maintenance since May  8, 2007  3:16:12 PM EDT<\/pre>\n<p>Reason: Start method failed repeatedly, last exited with status 1.<\/p>\n<pre>  See: <a title=\"http:\/\/sun.com\/msg\/SMF-8000-KS\" href=\"http:\/\/sun.com\/msg\/SMF-8000-KS\" rel=\"nofollow\">http:\/\/sun.com\/msg\/SMF-8000-KS<\/a>\r\n  See: httpd(8)\r\n  See: \/var\/svc\/log\/network-http:apache2.log<\/pre>\n<p>Impact: This service is not running.<\/p>\n<p>Note that the second to last line tells you where the log file is, so take a look at that. Once you&#8217;ve fixed the problem, you can restart apache with: svcadm restart \/network\/http:apache2<\/p>\n<p>If for some reason you want to shut off apache, use this: svcadm disable \/network\/http:apache2<\/p>\n<p>svcs -p \/network\/http:apache2 STATE STIME FMRI disabled 15:36:33 svc:\/network\/http:apache2<\/p>\n<p>&nbsp;<\/p>\n<p>svcs -l http fmri svc:\/network\/http:apache2 name Apache 2 HTTP server enabled false state disabled next_state none state_time May 8, 2007 3:36:33 PM EDT logfile \/var\/svc\/log\/network-http:apache2.log restarter svc:\/system\/svc\/restarter:default contract_id dependency require_all\/error svc:\/milestone\/network:default (online) dependency require_all\/none svc:\/system\/filesystem\/local:default (online) dependency optional_all\/error svc:\/system\/filesystem\/autofs:default (online)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The apache web server is included with Solaris 10. Follow these steps to enable it. Step 1: Create a working default apache config file The apache server config files are in \/etc\/apache2. To quickly get up and running, you can just use the sample config file by doing the following: cd \/etc\/apache2 cp httpd.conf-example httpd.conf [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[26,114,115],"tags":[27,116],"class_list":["post-197","post","type-post","status-publish","format-standard","hentry","category-apache2","category-solaris","category-solaris-10","tag-apache2-2","tag-solaris10"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3fcrv-3b","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/posts\/197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":1,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":198,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/posts\/197\/revisions\/198"}],"wp:attachment":[{"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}