Operating System - HP-UX
1830510 Members
2721 Online
110006 Solutions
New Discussion

to turn off httpd port/80

 
Fauziah Mahdan
Super Advisor

to turn off httpd port/80

Hi all,
My hpux11.11 server and it was db server
I already comment out this port at /etc/services file. Run inetd -c
But still can connect to this port. How to solve it?


Thanks
Fauziah
13 REPLIES 13
Arunvijai_4
Honored Contributor

Re: to turn off httpd port/80

Hi,

Did you stop the process which listens on port 80 ? You should try to stop or kill it.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Steven E. Protter
Exalted Contributor

Re: to turn off httpd port/80

Shalom

inetd is not used to run httpd server.

If you have an hp distribution:

/sbin/init.d/hpws_apache stop

vi /etc/rc.config.d/hpws_apacheconf

Change the startup variables from 1 to 0 (zero)
This second step stops auto start of the HP apache server.

The procedure is similar for other depot based versions of apache but the name hpws_apache may be apache or something else.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ninad_1
Honored Contributor

Re: to turn off httpd port/80

You need to stop the process using the port 80 which is the http port. Usually you may be having a apache or some sort of web service running. Only then you will not be able to access port 80.
/etc/services is just the lookup table where you map the port numbers to short service name which describes the service when you use netstat.

Regards,
Ninad
Fauziah Mahdan
Super Advisor

Re: to turn off httpd port/80

How :-)
Fauziah Mahdan
Super Advisor

Re: to turn off httpd port/80

How :-)
I means How to grep which applications is using port 80?
Arunvijai_4
Honored Contributor

Re: to turn off httpd port/80

Hi,

If apache is running, you can stop by

# apachectl stop

or # ps -ef |grep -i httpd
# kill PID

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Raj D.
Honored Contributor

Re: to turn off httpd port/80

Hi Fauziah,

Have you stopped both the entry in /etc/services, but putting # and inetd -c

--------
http 80/tcp www # World Wide Web HTTP
http 80/udp www # World Wide Web HTTP

-----------


hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Fauziah Mahdan
Super Advisor

Re: to turn off httpd port/80

Hi,
Thanks for reply.
Agree to stop the apache since I did not use it. But where to set the service for not startup. I can't find the etc/rc.config.d/hpws_apacheconf
file?

Fauziah
Fauziah Mahdan
Super Advisor

Re: to turn off httpd port/80

To be specified I can't find file so called hpws_apacheconf but the rc.config.d file exist.

Ninad_1
Honored Contributor

Re: to turn off httpd port/80

Hi,

Its not mandatory to have a file in /etc/rc.config.d - It depends on what software you have installed and how you have installed.
You may have apache as part of Oracle developer whatever version, you may have seperately installed apache server etc etc.
So you must know how the httpd service is started ? Is it started manually through starting apachectl ? Or is it part of any startup scripts in /sbin/init.d ? - grep apache /sbin/init.d/*

Then you can disable it permanantly by removing from init.d , or if its started manually by just stoppiong using apachectl stop once and not starting it anytime again.

Regards,
Ninad
Fauziah Mahdan
Super Advisor

Re: to turn off httpd port/80

Hi the apache version was installed during OS installation and it was Apache Strong 1.3.19.20 HP Apache_based Web Server With Strong (128 bit) Encryption.
Fauziah Mahdan
Super Advisor

Re: to turn off httpd port/80

Ok I manage to stop the apache by going to
/opt/apache/bin using apachectl stop.
The go to /etc/rc.config.d/apacheconf
set the apache start=0

Thanks all.
Matthew Ghofrani
Regular Advisor

Re: to turn off httpd port/80

You could have also checked /etc/rc.log to see what script could have started it.

Matthew from Boston
Life is full of bugs