Installation

Testing Apache 2 and mod_perl

Testing Apache 2 and mod_perl

by Deleted user -
Number of replies: 9
Hello,

I am trying to install WebWork on a SUSE Linux 10.2 server. As part of the instructions, I have to test that Apache is working properly by connecting to "http://localhost/". This step works fine and I see the page It works!
When I try connecting to "http://localhost/perl-status", I get that the URL cannot be found. I have checked for typos in the httpd.conf file but there is none.

I do however get the following error message when I start Apache

# /usr/local/apache2/bin/apachectl start
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

I have tried to remove port 80 from the config file and then it simply shuts down.
I do not see any other application running on port 80.
This server has been recently configured and nothing else has been installed.

All Perl modules are installed except for GD. Where could I have gone wrong?

Regards,
Marie-Claude
In reply to Deleted user

Re: Testing Apache 2 and mod_perl

by Arnold Pizer -
Hi Marie-Claude,

Are you following the specific SUSE 10.2 instructions http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt3forSuSE10pt2
or the more general instructions?

Arnie


In reply to Arnold Pizer

Re: Testing Apache 2 and mod_perl

by Deleted user -

Hello Arnie,

I am following the instructions you have quoted (and thank you for posting those instructions).

Can I proceed the installation even if I cannot connect to perl-status?

Regards,

Marie-Claude

In reply to Deleted user

Re: Testing Apache 2 and mod_perl

by Arnold Pizer -
Hi Marie-Claude,

If you can't connect to perl-status, something must be wrong. It might or might not affect WeBWorK, but I would be concerned. The first thing I would check is that http.conf is OK and that at the end of that file you have
<Location /perl-status>
 SetHandler perl-script
 PerlHandler Apache2::Status
 Order deny,allow
 Deny from all
 Allow from localhost
 Allow from .yourschool.edu
</Location>
Also the error messages when you start apache indicate that something is wrong. Can you connect to your server from a browser on a remote machine? I assume not. Port 80 is the standard http port (port 8080 is an alternate). Are you sure there isn't any other software that could be using port 80?

When you install apache2 and mod_perl from source following the directions, it installs Apache2::Status. You can check this by running
perl -MApache2::Status -e 'print 'Installed\n" '

If you do this, what do you get?

Arnie
In reply to Deleted user

Re: Testing Apache 2 and mod_perl

by Arnold Pizer -
Hello Marie-Claude,

Here's another thought. Often after trying "http://localhost" and seeing "It works" I then try "http://localhost/perl-status" I get nothing new. No error messages or anything, just the continued display of "It works" page. What I have to do is to close all Firefox sessions, open a new session and then connect to "http://localhost/perl-status" to see the results.

This is different than what you are seeing but possibly related.

Arnie
In reply to Deleted user

Re: Testing Apache 2 and mod_perl

by Davide Cervone -
This is not my expertise, but the error message you show seems to indicate that Apache thinks your host IP address is 0.0.0.0 whereas localhost should be 127.0.0.1. There may be a network configuration error that is the root of your problem. You might check your network setup to see what IP address you have set. Perhaps the command
    host localhost
will tell you something. When I issue this command, I get
    localhost has address 127.0.0.1
Give it a try. Davide
In reply to Davide Cervone

Re: Testing Apache 2 and mod_perl

by Deleted user -
it could also be that another program is using port 80. (another apache process).

Try this... $ps -xa. If you got any processes with paths to apache. try and stop the server or kill the processes, then start the server again.

Hope this helps.
In reply to Deleted user

Re: Testing Apache 2 and mod_perl

by Deleted user -
Thank you all for your help and sorry for the delay (I was busy marking final exams!).
It now works.
After executing the above suggestions, I realized that my config file in /usr/local/apache2/conf was never read. My lack of experience made me miss this important information. After manually killing all Apache processes I was able to execute "/usr/apache2/bin/apachectl start" without any errors.

The server has Apache installed in /etc/apache2. Does that mean that I installed Apache for nothing? Should I be modifying the config file in /etc/apache2?

In the installation manual, it is said that "/usr/apache2/bin/apachectl graceful" must be executed after a server reboot. Is there a reason why Apache is not part of the default system start up?

I am very grateful for your help. I am now downloading the WebWork libraries.

Regards,
Marie-Claude



In reply to Deleted user

Re: Testing Apache 2 and mod_perl

by Arnold Pizer -
Hi Marie-Claude,

I'm happy you got apache2 working.

My guess is that you have two installations of apache2 on your server.

One is in /etc/apache2/ which is where I think SUSE puts it. I'm thinking that you must have inadvertently selected the apache2 SUSE package when you were installing other packages. Assuming this was running, it also explains your problem above. The trouble with this is that with SUSE's version, I could never successfully install
libapreq2 and I couldn't find anyone on the web who had succeeded with this either.

Your second installation is in /usr/local/apache2/
which is where its put when installed from source. This is the installation you have to use. When you write "/usr/apache2/bin/apachectl graceful" I assume you really mean "/usr/local/apache2/bin/apachectl graceful" and this must be executed after a server reboot. The reason is that SUSE sets things up its own way and I don't know how to use their system services to start /usr/local/apache2. What you probably see in system services is /etc/apache2 which you don't want to use. At a minimum, you should disable this service so it doesn't start at bootup. I assume you can delete /etc/apache2 but that will probably leave vestiges around. My guess is that you can use the SUSE package system to remove /etc/apache2 completely and I don't think that should interfere with /usr/local/apache2 but I don't know for sure and I certainly haven't tested this.

I probably should ask a unix guru (or do some research) how to automatically start /usr/local/acache2 at startup. If I find out, I'll add it to the instructions.

Sincerely,

Arnie





In reply to Arnold Pizer

Re: Testing Apache 2 and mod_perl

by Deleted user -

Hello Arnie,

My installation of WebWork is now finalized and it is working! I did have two installations of Apache, and the default version obtained with Linus SuSE had to be removed.

I am also happy to say that Apache is automatically started when the server is rebooted. In my system, under /etc/init.d/, there is a file called boot.local 

I added the line /usr/local/apache2/bin/apachectl start

and upon rebooting the server, Apache is running.

Hopefully, there is something similar on your system that would allow you to automatically start Apache.

Again, thank you for your help.

Regards,

Marie-Claude