Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with apache2 on Solaris 10

Status
Not open for further replies.

MorganGreylock

Programmer
Jan 30, 2001
223
US
I am trying to configure apache2 on Solaris 10. It had already been installed, and the service was disabled. I started with svcadm enable apache2. Then it through apache2 into 'maintenance' status. It complained something about the config file (SMF_EXIT_ERR_CONFIG, status 96) and I then realized that the /etc/httpd.conf file wasn't there. I copied the one from /etc/apache2/httpd.conf-example to /etc/httpd.conf then updated it with my email address and server name. Everything else looked correct. I then tried to svcadm clear apache2 and then enable it, but I keep getting the SMF_EXIT_ERR_CONFIG message. I tried disabling then re-enabling, clear, refresh, and even using a very generic httpd.conf file. It still remains in maintenance status with the same error code. Does anyone have any suggestions about what I need to do to get this working?

Thanks in advance.
 
I would just compile a new one. I believe the Apache that comes with Solaris is tied to Management Center. I would just start fresh.
 
That's originally what I wanted to do, but unfortunately we are not permitted to have any compilers on our systems. (I thought I mentioned that in my original post but I guess I didn't after all.)

In any event, I wouldn't be adverse to disabling this one (or just uninstalling it altogether, whatever is necessary) and downloading a new one, but I've been trying to find pre-compiled binaries today but have yet to find one. To avoid that compiler hassle I wanted to see if it was possible to fix the current install, but again if my hands are tied it won't be that hard of a choice! ;-)

Thanks for the response!
 
I have the same rules. I just compile on a dev box into a custom directory structure, tar it up, and push it out to all my systems.
 
I tried to download the 'package' from sunfreeware.com, and it still required gcc, which I do not have access to. I'll have to look again, maybe I missed it. There was one that said it was a 'Solaris Package' but again it still required gcc.
 
Taken from the site:

apache-2.2.0-sol10-x86-local.gz Apache 2 - the popular web server - installs in /usr/local/apache2. This apache package was configured with openssl support. The apr-1.2.2, aprutil-1.2.2, expat, libiconv, gdbm, db-4.4.20.NC, openssl-0.9.8e, and either the libgcc or gcc must be installed. Documentation can be found in /usr/local/apache2/doc/apache2. The configuration files in /usr/local/apache2/conf must be edited to fit your site's needs, including ssl support. The httpd-std.conf there should be copied to httpd.conf and any edits you must make included.
 
Morgan - note "and either the libgcc or gcc" libgcc is just what it sounds like. Libraries from gcc. It is NOT a compiler. You will need libgcc to install OplenSSL as well (assuming you want to run HTTPS.
 
If I can make a suggestion...

1. # svcadm disable network/http
2. # cp /etc/httpd.conf /etc/apache2/httpd.conf
3. # /usr/apache2/bin/apachectl configtest
4. # /usr/apache2/bin/apachectl start
5. # tail /var/apache2/logs/error_log

To explain...
1. It's easier to troubleshoot the problem if you leave the SMF database out of the picture until you get apache running. Drop /usr/apache2/bin into your path and apachectl start/stop/restart/configtest become much more manageable than svcadm.

2. Sun's apache package is configured to look for the conf file in /etc/apache2, not /etc or /etc/httpd.

3. Always test your config changes with apache's config syntax check.

4,5. Start the server up if configtest passes. Check the the error log. My guess is that if apache still will not start you need to edit /etc/apache2/httpd.conf and change the User and Group directives to conform with an existing user on your server. If this does not resolve your problem, also change the LogLevel directive from warn to debug and restart. Lastly if all else fails, try pasting some appropriate lines from /var/apache2/logs/error_log here so we can take a looksee.

You should not need to compile from scratch. Anyone running a host of production class systems wants to rely on the Vendor's Support (aka testing, validation, etc.), reduce admin costs, and increase system security by not needing to load compilers on web servers. Using pre-compiled vendor supplied packages accomplishes this and is worth doing in the long run.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top