apache installation

I have installed sunsolaris 10 in sparc machine.In that how to run apache
bydefault apache is installed on /etc file.

I have logged in as a root
changed the directory to cd /etc/apache2/
from there i have copied httpd.conf-example to httpd.conf
#cp httpd.conf-example httpd.conf
after copied this httpd.conf-example file to httpd.conf
i have started the apache server through this command
svcadm restart apache2
svcs enable apache2
these steps i have done to run the apache on solaris 10
after done these steps i have opened the webbroser i have tried to open the apche website but i didnot get the web site but i was getting error message
i have tried to open the website through this website name
http://localhost.localdomain
when i typed this i am getting this error

ERROR:localhost.localdomain could not be found please check the name and try again.

please give the solution as soon as early

thanking you

the command is:

svcadm enable apache

have a look at the output of:

svcs -a | grep apache

to be sure.

edit:
i just checked on my solaris nevada installation... the provider is "apache22". i don't have a solaris 10 install to have a look for the provider but the "svcs -a" command should clear all questions.
and: it works :wink:

You copied and example httpd.conf, but did you actually configure it with your IP, port, etc? How's apache going to know what domain it is supposed to be if you don't tell it?

Open up the httpd.conf file, put your local IP in it, restart apache, then use your IP address in the URL, not localhost.domain. Go from there.

exactly...as system shock posted, there needs to be configuration done in apache conf file to run in your server. there is a config mode you can run apache...its configtest something. run it and you can know the errors in apache config file. If apache is installed & configured correctly, calling the ip will show apache page saying, apache is running in this machine...Hope this helps.

PS: if you r not sure of configtest....google abt it and you will find it...its no big deal...:):b:..enjoy...

i would recommend moving away from the pre-installed version of apache and compile from source yourself. i usually install under /usr/local/apache. personally, i like most of my stuff under the same dir.

however, you can work with the one already there. when you vi httpd.conf-example, search on "#ServerName www.example.com:80"
you need to change this to your local ip address... or your domain name.
that example one can be useful but it has lots of loaded modules and other thresholds set. again, i just personally like to start with a clean sheet before i load any module that could prevent me from using certain features or opening certain features i don't want.

when you vi httpd.conf-example and change it over to httpd.conf, restart apache2 with "svcadm restart apache2".

I have run some commands to run apache on solaris.Still i am unable to run apache on solaris which commands i have used on solaris 10 i had given below

bash-3.00# cd /etc/apache2/
bash-3.00# svcadm restart apache2
bash-3.00# svcs enable apache2
svcs: Pattern 'enable' doesn't match any instances
STATE STIME FMRI
maintenance 21:27:51 svc:/network/http:apache2
bash-3.00# svcadm enable apache2
bash-3.00# svcs -a | grep apache2
maintenance 21:27:51 svc:/network/http:apache2
bash-3.00# svcs -x | grep apache2
svc:/network/http:apache2 (Apache 2 HTTP server)
See: apache2(1M)
See: /etc/svc/volatile/network-http:apache2.log

after run this commands i have tried to open the website.
http://loclahost/ and http://127.0.0.1/

still i am confusing about this what could be the reason and where i have done the mistake.

Thanks.

investigate the log file that has been given to you...

# cat /etc/svc/volatile/network-http:apache2.log