LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help with apache 2.0 (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-apache-2-0-a-306127/)

The_Messiah 03-25-2005 08:56 PM

Help with apache 2.0
 
Well, I've recently decide to completly leave windows behind, so now I'm doing things to help expand my knowledge with linux, amongst other things.

I've just downloaded apache 2.0 and did the following commands.

#./configre
#make
#make install

That got it ready to go (I think so anyway)

The apache docs say to alter the httpd.conf file but I don't know anything about it, so if someone could help me out with things like, what to change...things like that.

Another thing, I tried the next step in the apache docs which is to run this command

#./apachectl start

And got this error in return...

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


If anyone could help me out with what I'm doing wrong, things I should do, things I should know, any advise really, It'd be greatly appreciated.

By the way, if anyone is wondering I'm using slackware 9.1 and 2.4.22 kernel.

Regards,
The_Messiah

JordanH 03-25-2005 11:29 PM

Not being an Apache expert, I'd suggest you take a look in the config file and make sure the ip address is specified. That error message makes me think it is trying to bind to an incorrect ip address (0.0.0.0). I think the config line is something like
Listen 192.168.0.5:80 (assuming your IP address is 192.168.0.5)

WhatsHisName 03-25-2005 11:40 PM

httpd.conf is full of helpful comments which are remarkably clear. Just print it out (all 19 pages) and read through it. Also reference the Apache documentation for any details that are not clear (httpd.apache.org/docs-2.0/).

Regarding your problem, it sounds like a problem with a “Listen” directives. If you added any ports for Apache to monitor, you may have added a conflict. In general, you will usually only find one defined Listen Directive (“Listen 80") out of the box. Look at httpd.apache.org/docs-2.0/mod/mpm_common.html#listen for info about Listen directives.

The_Messiah 03-26-2005 12:43 AM

I took Jordan's advise and changed the ip's, I made them 127.0.0.1.

Then I ran that "./apachectl start"

I got no feedback so I went to http://localhost/ and found that I was successful.

The page said this--
If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.

So what I'm asking is where should I go from here, I think running a SSL server would be handy. I'd also like to play around with php.

I was also wondering, when I go to http://localhost/ and it shows that test page, where is it getting that from? I can't find it in my apache folder (I might not be looking hard enough)

WhatsHisName 03-26-2005 08:40 AM

Quote:

I took Jordan's advise and changed the ip's, I made them 127.0.0.1.
If you entered “Listen 127.0.0.1:80", then only the local host can access the pages. Change it to “Listen 80".

Quote:

I was also wondering, when I go to http://localhost/ and it shows that test page, where is it getting that from? I can't find it in my apache folder (I might not be looking hard enough)
Look under /var/www. If you have html files you want to display, put them in /var/www/http, but you can define any location as the source by making changes in httpd.conf.

Again, if you want to know more about configuring Apache, start reading through httpd.conf or get detailed help from http://httpd.apache.org/docs-2.0/.

JordanH 03-26-2005 11:40 AM

Quote:

Originally posted by The_Messiah
So what I'm asking is where should I go from here, I think running a SSL server would be handy. I'd also like to play around with php.
Wow... that's a big question. :jawa: The answer is, the world's your oyster. Only you can set the direction you want to take your site.

If you have specific questions, I'll be glad to help to the best of my limited ability.

WhatsHisName is correct, you must look in your apache config file to find out where the root of your web server is. It's likely under /var/www or I think SuSE might put it under /srv/www ... You can specify this whereever you like but I'd leave it as the default until you know what you are doing thoroughly.

I'm glad all is well, good luck.
J.

The_Messiah 03-27-2005 12:19 AM

Quote:

Originally posted by WhatsHisName
Look under /var/www. If you have html files you want to display, put them in /var/www/http, but you can define any location as the source by making changes in httpd.conf.

I don't have a /var/www...is there somewhere else it would be located...or is it a problem that I don't have it?

JordanH 03-27-2005 10:30 AM

If you got the test page, then you have it somewhere. You'll have to look around to find it.


All times are GMT -5. The time now is 06:06 PM.