1830354 Members
3001 Online
110001 Solutions
New Discussion

How to open Port 80

 
Oliver Schmitz
Regular Advisor

How to open Port 80

Dear all,

I installed an apache webserver and try to reach my maschine. i detected two strange behaviours/facts:

When I try to start the webserver with the apachctl or directly with httpd -k start nothing happens (I am thinking about any response, a status or error report or something similar). Instead if I look for this process with top I see an increase of the cpu usage divergent against 100% (stoped it before) but no message.

What should I see?

I try to reach my maschine with a browser and a tool which checks the ports opened. the Result: Port 80 is closed. How can I open it?

Is this closed port (which is defined as the port to listen to in the httpd.conf) a proper reason for the first behaviour described above?

Thanks and best regads,

Oliver
Oliver Schmitz
31 REPLIES 31
Robert-Jan Goossens
Honored Contributor

Re: How to open Port 80

HI Oliver,

did you configure port 80 in the /etc/services file ?

Robert-Jan
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Dear Robert,

it looks like. I checked the /etc/services and there is the line

http 80/tcp www # World Wide Web HTT

inside. Is this enough. How to activate changes to this file?

Best regards,

Oliver
Oliver Schmitz
John Palmer
Honored Contributor

Re: How to open Port 80

/etc/services is a red herring. The reason port 80 isn't open is that Apache isn't running so hasn't opened it.

Check your configuration in /.../Apache/Apache/conf and logs in /.../Apache/Apache/logs

to try to determine what's going wrong.

Regards,
John
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

I am just trying to do so but obviously without much success: The http.conf seems to me (which must not be a very hard argument) allright (I have a book and I am doing it quite similar). That the port is not opened unless the apache is running is reasonable to me, so thanks for that.

Now the main question: What do I intend to see when starting the apache with httpd -k start?

As I mentioned I see nothing but a very busy processor.

I have no ideas to fiddle out what could run wrong so it would be nice if anybody has some. It is my first time I am setting up such a server.

Thanks in advance and best regards,

oliver
Oliver Schmitz
Robert-Jan Goossens
Honored Contributor

Re: How to open Port 80

HI Oliver,

Could you give us a bit more info on what you are installing and where did you get the software ?

Somathing like below.

http://www.software.hp.com/portal/swdepot/displayInstallInfo.do?productNumber=HPUXWSATW101001

Regards,
Robert-Jan
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Hi Robert,

thanks for your helpstarter: I installed the hp software product B9416AA which is the apache webserver deliverd with the HP-UX 11.i TCOE

Do you know something about troubles with this product, patches needed etc.

Thanks for more hints.

Best regards,

Oliver
Oliver Schmitz
KapilRaj
Honored Contributor

Re: How to open Port 80

R u starting it as root ?. If not u have to have setuid set on httpd binary

Kaps
Nothing is impossible
KapilRaj
Honored Contributor

Re: How to open Port 80

can u post the error in $APACHE_HOME (where u have apache installed)/log/error*

Kaps
Nothing is impossible
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Dear Kapil,

thanks for your advices. I am really interested aswell in at least one log: The bad message is: There is nothing inside my APACHE_HOME/logs

Any explanation for this?

Maybe the version on the os bundle is not so good?

Thanks for more,

best regards,

Oliver
Oliver Schmitz
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Dear all,

I have some new hints of disfunctionality:

Try apachectl status and fullstatus. The response:

#:apachectl status
Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status

[3]+ Done apachectl status
#: apachectl fullstatus &
[3] 18042
root@ipp060:
Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status

[3]+ Done apachectl fullstatus


Gives this some more reasonable hints to this behaviour beside that the server itself is obviously not runnig (but this is show as httpd in the ps -ef).

Thanks,

Oliver
Oliver Schmitz
KapilRaj
Honored Contributor

Re: How to open Port 80

Can u do a apachectl -configtest and post the output please ... It will check for errors in config file (httpd.conf)

where is apache installed ?
do u hv a conf directory and httpd.conf in their ?

Kaps
Nothing is impossible
T. M. Louah
Esteemed Contributor

Re: How to open Port 80

Bundled documentation (Release Notes, Admin Guides, User Guides, Migration Guides and FAQs) now install into /opt/hpws/hp_docs. These documents can be accessed after starting HP-UX Apache-based Web Server, HP-UX Tomcat-based Servlet Engine, and HP-UX Webmin-based Admin by browsing to http://yourserver.com/hp_docs on the appropriate port (i.e., for Webmin on port 10000, the URL should be: http://yourserver.com:10000/hp_docs). ). See /opt/hpws/README for more information about getting started with each component.
Little learning is dangerous!
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Dear Kapil,

I tested around with the features of the pachectl script. No good news from this:

status and fullstatus: see above

everything else including configtest: Nothing, this means really nothing: No new logs, no message on the screen... (o.k. help works as it should(oh no not really: The help of httpd but not the one of apachectl appears).

By the way: Everything looks like there is no apache installed at all. But it really is!! httpd -v gives

Server version: HP Apache-based Web Server/2.0.43
Server built: Oct 16 2002 20:49:56

The apache_home/conf/httpd.conf is there and I went through it for 20 times now-> nothinf which looks too unreasonable.

So I am more and more lost. If anybody has more ideas wolud be more than welcome.

What about the websuite from hp? Are only expensive products working? The decission to buy a hp workstation was among other reasons based on the apache included. Should it run at all (has anybody a proper running apache?)?

Nevertheless it has to work and therefore I am more than happy about more help.

Thanks in advance and best regards,

oliver
Oliver Schmitz
KapilRaj
Honored Contributor

Re: How to open Port 80

no worries i have had many apaches runing .. and it RUNS !!!!

As I hv seen earlier i have seen the following directories under $APACHE_HOME

bin conf htdocs libexec logs proxy

Are all directories present ?. U said logs is not there ... can u create it ?

ARE YOU STARTING IT AS ROOT ??. Else u will not be able to bind port 80

I would try this way ...

Login as root

cd $APACHE_HOME
bin/apachectl start
ps -ef |grep apache|grep -v grep
if not found then i would cd logs and see any error file is created and view it !

Kaps
Nothing is impossible
Mark Grant
Honored Contributor

Re: How to open Port 80

If you ping "localhost" do you get a response?

If not put "127.0.0.1 localhost" in your /etc/hosts file.
Never preceed any demonstration with anything more predictive than "watch this"
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Hi Kapil,

thank you very much for your intense help. Here some more infomation:

1.) The content of my apache_home which is /opt/hpapache2/

LICENSE bin conf htdocs lib modules tomcat
LICENSES build error icons logs php util
README cgi-bin hp_apache_docs include man ssl webmin

2.) I did
cd /opt/hpapache2/bin
./apachectl start
and nothing more to do on this terminal (I know the & was missing (or not?))

On another terminal I did the ps and the response is:

root 18153 17965 0 17:33:19 pts/1 0:00 /usr/bin/sh ./apachectl start
root 18154 18153 255 17:33:19 pts/1 6:19 /opt/hpapache2/bin/httpd -d /opt/hpapache2 -k start

Is it right to think that apachectl start does not succeed baut mannaged to start the httpd?

Thanks for some thoughts about this.

Oliver
Oliver Schmitz
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

PING localhost.ipp.kfa-juelich.de: 64 byte packets
64 bytes from 127.0.0.1: icmp_seq=0. time=0. ms
64 bytes from 127.0.0.1: icmp_seq=1. time=0. ms
64 bytes from 127.0.0.1: icmp_seq=2. time=0. ms
64 bytes from 127.0.0.1: icmp_seq=3. time=0. ms

----localhost.ipp.kfa-juelich.de PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
Oliver Schmitz
KapilRaj
Honored Contributor

Re: How to open Port 80

It looks like apache is started . httpd is the daemon process which listens to the port which u hv specified in httpd.conf

can u do lsof -i tcp:80 (U should hv lsof installed)

or can u start an Internet explorer with "http://hostname/"

Kaps
Nothing is impossible
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Concerning the remark of T.M.Loah:

I have no /opt/hpws directory on my maschine. Any ideas whether this could be a problem.

Concerning documents to access: In my httpd.conf the DocumentRoot is set to /opt/hpapache27htdocs and inside there is the index.html from the apache documentation. This should not be the error, shouldn't it?

Thanks and best regards,

oliver
Oliver Schmitz
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Dear Kapil,

I have no isof installed (where can I get it from?).

Therefore I tried again to reach my document with a browser. The answer was that no connection could be established (connection refused in netscape and Not connection possible in my Konqueror).

The apachectl start is still running now if I look with ps -ef|grep httpd.
Is this reasonable?

Thanks for more in advance and best regards,

oliver

Oliver Schmitz
Robert-Jan Goossens
Honored Contributor

Re: How to open Port 80

KapilRaj
Honored Contributor

Re: How to open Port 80

Hv u started it as root ?? u hv never answered it ..

Kaps
Nothing is impossible
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Dear Kapil,

sorry, yes I started it as root.
I mde an own user and group to run my apache but after it did not work I tried and tried and tried... it as root.

Can I correct/control the port binding?

Thanks again,

Oliver
Oliver Schmitz
Oliver Schmitz
Regular Advisor

Re: How to open Port 80

Dear Robert,

I installed the lsof from the source you mentioned and choosed the one for the PA-Risc version of HP-UX11.00: Another strange result when I try to run lsof:

lsof: FATAL: lsof was built for a 32 bit kernel, but this
is a 64 bit kernel.

Is this reasonable for this source.

Thanks,

Oliver
Oliver Schmitz