Solved

Apache1.3.20 wouldn't start up on my Mandrake7.2

Posted on 2002-04-19
26
268 Views
Last Modified: 2010-03-04
Hi experts,

I successfully installed Apache1.3.20 on my Mandrake 7.2. But after i issued "/usr/sbin/aparchectl start", nothing happened and theApache server isnot running.

What's going on? Please give me a hand.

Ken
0
Comment
Question by:ken021600
  • 14
  • 12
26 Comments
 
LVL 15

Expert Comment

by:samri
ID: 6954255
ken,

I doesn't have much experience with Mandrake 7.2.  Well, let's work on with some common knowledge that I have.

First, make sure the config file is OK.  try doing /path/to/apachectl configtest.  If everything is OK, it should print "Syntax OK".  Then proceed.   Start apache as normal, and try to establist a telnet session to the TCP port that Apache is listing.  a "telnet localhost 80" would do if you apache is listening on port 80.  Type in anything, and hit enter twice.  You should get some response from the Apache daemon.  Otherwise, you will get "Connection refused".

If it still failed, take a look at the apache's log file.  Standard apache logs would be in /usr/local/apache/logs/error_log.  RH 7.2 would be in /var/log/httpd/error_log, Mandrake - I have no idea.

And check the syslog to for any other error.

If there is someting in the error log, we would be interested to find out what.  

Btw, the packages that you installed is standard Apache that comes with Mandrake, or some precompiled binaries that you download, or the one that you build locally on the machine?
0
 

Author Comment

by:ken021600
ID: 6955519
Hi,
Thanks a lot for your help.

1) i removed the Apache package came with Mandrake and downloaded precompiled binaries from its official site. The reason was simple: I wanted a newer version.

2) i tried "/usr/local/apache/apachectl configtest" but nothing happened---i just got a prompt, as if i didn't do anything. No error messages, no "syntax OK".

3) The content of /usr/local/apache/logs/error_log is:
[Mon Apr 15 20:37:25 2002] [notice] Apache/1.3.20 (Unix) configured -- resuming normal operations
[Mon Apr 15 21:02:27 2002] [notice] caught SIGTERM, shutting down
[Mon Apr 15 21:04:50 2002] [notice] Apache/1.3.20 (Unix) configured -- resuming normal operations
[Mon Apr 15 22:19:08 2002] [notice] caught SIGTERM, shutting down

I look forward to your further help.
Thanks again,

KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6956054
Ken,

from the error log, it seems that your apache daemon dies, as soon as it started.  Could you check you syslog for any error there.

did you try "telnet localhost 80", to see if there is any service bound to port 80/TCP.

Try to start apache; /usr/local/apache/bin/apachectl start

and do the telnet test again.

It seems a bit weird.
0
 
LVL 15

Expert Comment

by:samri
ID: 6956073
Ken,

since you are looking for the latest version, perhaps you could grab the source code, and rebuild the apache locally.  That way would be much better.

just a thought.
0
 

Author Comment

by:ken021600
ID: 6957221
Can you show me how to check my "syslog"? where is it and what commands should i issue?

Thanks,
Ken
0
 

Author Comment

by:ken021600
ID: 6958451
After issuing "usr/sbin/local/apachectl start" i tried "telnet localhost 80" and got the following:

Trying 127.0.0.1......
telnet unable to connect to remote host: Connection refused

So what's the problem??

Cheers,
Ken
0
 
LVL 15

Expert Comment

by:samri
ID: 6958729
Ken,

Gee.. I've check my stock on rh7.2, apache service doesn't seems to log anything to syslog (/var/log/messages).  The only place I can find something is only in apache error_log.

Based on your last attempt to telnet localhost 80, it seems that your apache failed to start totally.  I am afraid, I can help you much in this.   There should be a waay to debug the execution and determine where it failed.  But it is truly beyond my experience.

The most I can recommend (and what I personally would do) at the moment, is to grab a copy of the source code, and try to build it locally.  Given the fact that most Linux installation would have installed the development tools, and the libraries, you should be able to build with minimal programming experience.

Unless you are willing to wait, shoud there are other members that might be able to offer suggestion, or you can proceed to work on a fresh Apache for yourself.

In case you are interested to explore, grab yourself a copy of the latest apache; http://www.apache.org/dist/httpd/apache_1.3.24.tar.gz
Uncompress is, untar it, go to the package dir, and do "./configure", this should get you ready with the default spec., once everting is OK, do a "make" and "make install".  The whole development procedure is detailed out in INSTALL file.

Give it a shot.

Apology on not be able to help you in troubleshooting your existing problem :(

cheers.
0
 

Author Comment

by:ken021600
ID: 6958756
Thanks for your help anyway.

Actually i downloaded the source 1.3.20 and have gone through the path(untar, configure, make and make install). and i don't think there would be any difference if i just downloaded the latest version...there must be something wrong in my system.

just off the top of my head: as a matter of fact i successfully launched Apache at the first time. then i tried to install some new packages (GIMP, PHP and PostgreSQL) but was told there were conflictions. then i uninstalled something(can't remember now) and all of a sudden my Apache wouldn't start! Does it have something to do with the problem?

Cheers,
KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6958784
I must have thought the same thing.

One option that you might want to try is to configure you apaache to listed to a different port; maybe 9000 for example, and try to restart.

#
# Port: The port to which the standalone server listens. For
# ports < 1023, you will need httpd to be run as root initially.
#
#Port 80
Port 9000

And try to do the "telnet" test.  I cannot guarantee it might work either.

Personally, if there are no other dependencies (application), and your are OK with downtime, reinstalling the whole box would be my option.  Tweaking the box to get it to work is great, but it is going to take longer that you can ever anticipate.  It's your call anyway.

good luck.
0
 

Author Comment

by:ken021600
ID: 6958792
Thanks for your promptly reply.

so how can i test it? i mean, what commands should i issue? how do i configure Apache so that it will run on port 9000?

KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6958851
This is strictly for testing purpose.

You can do that by editing the /usr/local/apache/conf/httpd.conf

Look for the #Port 80 keyword.  Add a new line;
Port 9000

Save the file, and start apache.  

I cannot guarantee that your apache should work, since in the erlier stage it looks like the problem is not with conflict in TCP Port.

It's just to make sure that we eliminate the port problem

Specifically, if the confilict with TCP Port, the error (/usr/local/apache/logs/error_log) should have been
[Thu Apr 11 17:28:11 2002] [notice] caught SIGTERM, shutting down
[Mon Apr 22 10:13:43 2002] [crit] (98)Address already in use: make_sock: could not bind to port 80

Give it a shot.
0
 

Author Comment

by:ken021600
ID: 6959016
OK i'll give it a go and come back later. meanwhile, do you mind answering 3 quick questions? I'll give you points anyway(or even more, depends on how helpful your answers are) coz i'm just not a miser. :) The following questions have nothing to do with apache, but i guess you're able to give me a hand.


1) "Sony CRX175A1 24x10x40 CD-Rewriter OEM" this is an ad i found. i'm attracted by "Sony", but confused
by "OEM". so this product is made by some hardware manufacturer, but now is under the name of "Sony",
right? Is it true that Sony didn't manufacture it, but some third party made it?

2) Can you mention a few popular programs people use to watch DVD under Linux? and under Linux, is there
any software which cracks the "zone limitation" and lets people watch DVD programs freely?

3) How can i keep anonymous on the internet, if i want? i mean suppose i've registered a domain name
and set up a website but i don't want a lot of people to visit my site. rather, i prefer that only my
friends know the existence of this website and view it. Nowadays search engines are becoming more and
more powerful and billions of webpages have been put into their databases. is it possible for me to
keep anonymous on the web?

Thanks a bunch,
KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6959057


1.  To my understanding, OEM simply means "Original Equipment Manufacturer"; what does this mean;  The product is produced by Sony, maybe not 100% of it's component, but in most cases the "core" is.  And assembled by 3rd party manufacturer, and maybe sold under different brand name.  Back to this particular model,  It seems to be advertised under Sony brand name.  I bet it's a good as Sony's quality.

2. DVD under linux.  Beats me.  I normally use Unix/Linux for more back office, and experimenting things.  I rarely use it for home/productivity application.  Under Win, I use WinDVD, and there is crack that can overcome zone restriction.

3. Website are normally private, until it's because too popular.  Basicall, the search engine will use robots to crawl into websites, and indexs the pages;
 
One options to limit such activities is by creating a special file "robots.txt" in the root on the webserver.

I personally have come to that stage that requires such paranoid setup, but this link should get you started.

http://www.robotstxt.org/wc/norobots.html

Another option is to limit access to your server to only those that you want to know;  THis would include running the server on port other than 80 (which is the default for http), or limit access control, by firewall maybe, or TCP wrapper, or ACL within Apache (if this is your web platform) itself.

Another ways is not to use www.yoursite.com (for example), instead just use other names.  Just leave it to use Ip address is fine.  As far as webserver operation it is OK.

There are really various (way too many) ways to do what you are looking for, these few examples are just a starting point.

Btw, EE is a great place where people-help-people, and the pts are just some token to make helping more "interesting".  As just money is the currency in real-word, maybe in EE, the pts, are the means to measuring how important a problem is, and the grade are a measure of saying how big the "thank you is".  Sorry, English is not my native language, maybe some of the words may sounds awkward.  Apology.  Btw, I'm doing a full time work, just flipping the window once in a while, to see how things are going.


cheers.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:ken021600
ID: 6959065
I've tried to add a new line "Port 9000" to httpd.conf file and tried to launch apache again. Also, I tried "telnet localhost 9000" fruitlessly:

Trying 127.0.0.1......
telnet unable to connect to remote host: Connection refused

so what's the next step? I'm holding my breath...

Thanks,
KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6959116
it seems that it's going to be a "no go" solution.  I'm pretty much stuck myself.  Personally, I would go for the refreshing my OS.  It seems that nothing (in my knowledge) might be able to help you at this point).

It might be a good choise to reinstall, but to me that is the only option.  You can however, hang on for a few days, maybe somebody might be able to give a hint, or you ca go ahead with fresh install (since your apache is working before you add a few goodies).

it's your call.
0
 

Author Comment

by:ken021600
ID: 6959526
OK I'll hang out for a while and see what happens...by the way, i have a few general UNIX questions please help me out.

1) why issuing "ls >ls.out" would cause "ls.out" to be included in the list of names? This is counter-intuitive and i just can't understand it. Well this is my logic: the "ls" command will find all files and their names in the current directory, and write them to a file called "ls.out". Why is "ls.out" itself included in the list???

2) Suppose there is a file called "temp" in the current directory. Is there any difference between "sort <temp" and "sort temp"? I know what "redirection" is, but I can't see a big deal here. All in all, the file "temp" is sorted. What's the point of distinguishing one from another?

Thanks a bunch,
KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6959813
ken,

gee... it sounds like a trick question to me.  Anyhow, I personlly never tested any of the things that you are curious about.  Perhaps the ls.out is included in the ls output is due to the fact that  unix is multitasking, multiuser.  Imagine another scenario, "tail -f test.txt".  The logic is, the tail command should display the last few lines on the file test.txt, but the command tail -f will wait indefinitely (until interrupted), and display any new lines added to the file.  I guess the same concept could be applied to the ls command.  During the execution of ls > ls.out, the shell will send the list of files in current directory one at a time, update the access time, check the permission, attributed, blah  blah, well, after a few files, the output file might have been created, and by the time it reaches, the file starting with "l", which ls.out  might be one of them.  This is just an assumption.  You can verify this by doing ls > 1.out.  See whether 1.out is included too.

I think that there is no difference.  And in fact redirection, pipe, STDIN, STDOUT, shells, and among a few "beauty" of unix, that Windows (to name a few) failed to even come close.  For this particular scenario, (in fact any case) a command, will expect input.  Normally the input will come from STDIN.  Well in "sort temp" case, the temp will be the input to sort cmd, and in the 2nd case, temp is redirected to the cmd sort.  Heck.. I got confused myself.

Honesy, most of the explanation are based on my experience, and might not be the "Text book" solution.  This is solely my opinion.

* Gee.. you got me there :).
Back to your apache problem, what did you decided?  I felt sorry for not be able to give a "direct" sollution.  Personally, a problem is still a problem, but if you are stuck, hit a dead-end, why not looking for alternative solution.  That's why I am suggestion you to perhaps start from scratch.  wait a minute, it the worst solution that anyone could have offered - it's like "i can't fix this, lets thrash it and buy a new one" approach.

cheers.
0
 
LVL 15

Expert Comment

by:samri
ID: 6959822
ken,

gee... it sounds like a trick question to me.  Anyhow, I personlly never tested any of the things that you are curious about.  Perhaps the ls.out is included in the ls output is due to the fact that  unix is multitasking, multiuser.  Imagine another scenario, "tail -f test.txt".  The logic is, the tail command should display the last few lines on the file test.txt, but the command tail -f will wait indefinitely (until interrupted), and display any new lines added to the file.  I guess the same concept could be applied to the ls command.  During the execution of ls > ls.out, the shell will send the list of files in current directory one at a time, update the access time, check the permission, attributed, blah  blah, well, after a few files, the output file might have been created, and by the time it reaches, the file starting with "l", which ls.out  might be one of them.  This is just an assumption.  You can verify this by doing ls > 1.out.  See whether 1.out is included too.

I think that there is no difference.  And in fact redirection, pipe, STDIN, STDOUT, shells, and among a few "beauty" of unix, that Windows (to name a few) failed to even come close.  For this particular scenario, (in fact any case) a command, will expect input.  Normally the input will come from STDIN.  Well in "sort temp" case, the temp will be the input to sort cmd, and in the 2nd case, temp is redirected to the cmd sort.  Heck.. I got confused myself.

Honesy, most of the explanation are based on my experience, and might not be the "Text book" solution.  This is solely my opinion.

* Gee.. you got me there :).
Back to your apache problem, what did you decided?  I felt sorry for not be able to give a "direct" sollution.  Personally, a problem is still a problem, but if you are stuck, hit a dead-end, why not looking for alternative solution.  That's why I am suggestion you to perhaps start from scratch.  wait a minute, it the worst solution that anyone could have offered - it's like "i can't fix this, lets thrash it and buy a new one" approach.

cheers.
0
 

Author Comment

by:ken021600
ID: 6974286
Hi samri,

what's up?

as tomy Apache problem, i deleted the whole package and installed version 1.3.14-----the RPM came with Mandrake. now everything's fine, but i got a new problem!

Where can i find the file "index.html" which becomes the main page if i type "http://localhost"? and i just couldn't find it by using "locate" or "find"......

Please give me a hand.

KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6975065
Ken,

Something is very intersting here...

There is no index.html by default.  Somehow Apache will use what's so called the internal mod_negotiation to display the correct index.html.en (if you are using engling locale).

http://localhost:8000/manual/mod/mod_negotiation.html

The one that might interest you would be this secion:
LanguagePriority directive

By default, the server would searh for index.html (or whatever files specified in the DirectoryIndex directive.  If it does not exist, it will try to look for file index.html.xx (or the default directory indexfile, and xx is the two digit iso locate abbreviation).

I hope this helps.

cheers/
0
 

Author Comment

by:ken021600
ID: 6975932
Hi samri,

maybe i didn't put it clearly. i'm looking for the default page which i can modify and can be displayed as the main page if i type in "http://localhost".

I also downloaded Apache1.3.24 for Windows and installed it on my Windows98. The default page under it is called "index.html" and it is under the directory "htdocs". Unfortunately things are different under Linux and i didn't find a "htdocs" directory...

Cheers,
KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6976128
Ken.

Ok.  I may overlooked the small prints.

Anyhow, under Linux, by default it should be in /usr/local/apache/htdocs.  Somehow, some RH7.2, the default would be in /var/www/html.  On Mandrake - I really have no idea.  I would presume that it is in /var/www/html.  Other location that is worth checking would in in /home/httpd/html or /home/httpd/htdocs.

Perhaps you could take a peek at httpd.conf (/etc/httpd/conf/httpd.conf or /usr/local/apache/conf/httpd.conf), and look for DocumentRoot directive.

good luck
0
 

Author Comment

by:ken021600
ID: 6978969
ok i got it. it IS under /var/www/html directory. i think this is due to the fact that Mandrake is 99% compatible with Redhat.

but now i wanna know:
1) what does that "var" directory do? generally speaking, what sort of files are put under that directory?

2) if i put all my webpages under /var/www/html, will this cause security concerns? will people be able to view pages/files under /var/www/html only, or they'll be able to visit files in other directories as well?

Thanks a lot,
KEN
0
 
LVL 15

Accepted Solution

by:
samri earned 100 total points
ID: 6979231
ken,

"var" normally holds the systems data that is not static.  Most common item would be log files, runtime status.  It is quite strage (my opinion) on why RH tend to place the htdocs (document root) in this directory.  Other directory /bin would be for executable that rarely (never) changes, /usr/local/bin would be for the binaries that is localized to the machine (in a clustered env), /sbin would be binaries specific for superuser or administrative operation.

By default, apache has gone thru years of popularity, and 60%+ market shared (http://www.netcraft.com/) has proven that it is a reliable/robust web server.  Back to FS security, the web engine is design (by default) to be secure, unless the tweaking is done to the httpd.conf (or during apache compilation) to relax those default security "policies".

Some links that you might want to take a peek.
http://httpd.apache.org/docs/misc/

cheers.
http://httpd.apache.org/docs/misc/security_tips.html
 
0
 

Author Comment

by:ken021600
ID: 6989562
Again, thanks a lot for your help!

Maybe you could give me a hand next time i get stuck.

KEN
0
 
LVL 15

Expert Comment

by:samri
ID: 6992660
sure, no problem.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now