LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-24-2006, 05:18 PM   #1
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Rep: Reputation: 15
Apache problems!


Got to the final step of setup.

Start the apache daemon by using

Quote:
[root@cpe-24-195-24-133 httpd-2.2.0]# /usr/local/apache2/bin/apachect1 start
-bash: /usr/local/apache2/bin/apachect1: No such file or directory
any clue? Maybe I downloaded something wrong or im in the wrong dir to be doing this?

update:

Quote:
[root@cpe-24-195-24-133 ~]# cd /
[root@cpe-24-195-24-133 /]# ls
bin dev home lost+found misc net proc sbin srv tmp var
boot etc lib media mnt opt root selinux sys usr
[root@cpe-24-195-24-133 /]# cd /usr/local
[root@cpe-24-195-24-133 local]# ls
apache2 bin etc games include lib libexec mysql sbin share src
[root@cpe-24-195-24-133 local]# cd apache2
[root@cpe-24-195-24-133 apache2]# ls
bin cgi-bin error icons lib man modules
build conf htdocs include logs manual
[root@cpe-24-195-24-133 apache2]# cd bin
[root@cpe-24-195-24-133 bin]# ls
ab apu-1-config dbmmanage htcacheclean htpasswd logresolve
apachectl apxs envvars htdbm httpd rotatelogs
apr-1-config checkgid envvars-std htdigest httxt2dbm
[root@cpe-24-195-24-133 bin]# apapchect1
-bash: apapchect1: command not found
[root@cpe-24-195-24-133 bin]# apachect1 start
-bash: apachect1: command not found
[root@cpe-24-195-24-133 bin]# cd apachect1
-bash: cd: apachect1: No such file or directory
[root@cpe-24-195-24-133 bin]#
everything by envvars and envvars-std is green. Don't know if that means much. I wanted to see if I actually had the files.

Last edited by Markness; 04-24-2006 at 05:29 PM.
 
Old 04-24-2006, 05:32 PM   #2
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
The last character is the number one... change it to lower case L => apachect"hell" not apachect"one"
 
Old 04-24-2006, 05:36 PM   #3
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
This is the error I got, but that worked! Thanks!

Quote:
[mbenoit@cpe-24-195-24-133 ~]$ /usr/local/apache2/bin/apachectl start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[mbenoit@cpe-24-195-24-133 ~]$
 
Old 04-24-2006, 05:43 PM   #4
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by Markness
This is the error I got, but that worked! Thanks!
That means something else is running and listening on port 80.

Run these commands:

$ ps ax | grep http
$ ps ax | grep inetd

Please post the output from both commmands.

Peace...
 
Old 04-24-2006, 05:48 PM   #5
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
Huzzah! Here it is.

Quote:
[mbenoit@cpe-24-195-24-133 ~]$ ps ax | grep http
27883 pts/3 S+ 0:00 grep http
[mbenoit@cpe-24-195-24-133 ~]$ ps ax | grep inetd
27886 pts/3 R+ 0:00 grep inetd
[mbenoit@cpe-24-195-24-133 ~]$
 
Old 04-24-2006, 05:51 PM   #6
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Duh, I'm an idiot. You must start Apache as root so it can bind to address 80.

$ su
# /path/to/apache/bin/apachectl start
# exit
$ ps ax | grep http

httpd should appear. Sorry about that.

Peace...
 
Old 04-24-2006, 06:01 PM   #7
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
heres the output. does this mean apache is started and running?

Quote:
[mbenoit@cpe-24-195-24-133 ~]$ ps ax | grep http
27974 ? Ss 0:00 /usr/local/apache2/bin/httpd -k start
27975 ? S 0:00 /usr/local/apache2/bin/httpd -k start
27976 ? S 0:00 /usr/local/apache2/bin/httpd -k start
27977 ? S 0:00 /usr/local/apache2/bin/httpd -k start
27978 ? S 0:00 /usr/local/apache2/bin/httpd -k start
27979 ? S 0:00 /usr/local/apache2/bin/httpd -k start
27983 pts/3 R+ 0:00 grep http
[mbenoit@cpe-24-195-24-133 ~]$
 
Old 04-24-2006, 06:10 PM   #8
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by Markness
heres the output. does this mean apache is started and running?
Yup.

Peace...
 
Old 04-24-2006, 07:08 PM   #9
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
Ok. Another problem I ran into.

I got Apache, MySQL, and PHP sucessfully installed on my system. I went to http://localhost and got the message "it works" so I was guessing it worked. I created my first php file firstprog.php and I went to localhost to type in:

http://localhost/firstprog.php and it coulden't resolve anything. The program is sitting in my home dir. Where the heck do I have to put it to view it? I'll be around for quick repies.
 
Old 04-24-2006, 07:58 PM   #10
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
You will have to look at your httpd.conf file to find out where "DocumentRoot" is. That is where Apache will look for HTML files, by default. The easiest thing for you to do is search for "DocumentRoot" in httpd.conf and put your test PHP script in that directory, the one identified in the "DocumentRoot" directive, and then your URL, as coded above, should "work". You might have PHP issues but at least Apache will be able to locate the file.

Was that quick enough for you?

Peace...
 
Old 04-24-2006, 08:08 PM   #11
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
After several refreshes, yes Let me try.
 
Old 04-24-2006, 08:15 PM   #12
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
Ok. Found it.

Put the file in there, but it doesnt display the html or the php, just the code. Did I not install something correctly?
 
Old 04-24-2006, 09:08 PM   #13
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by Markness
Put the file in there, but it doesnt display the html or the php, just the code. Did I not install something correctly?
Do you mean the PHP script displays instead of the output from the script? If so, did you follow steps #14 and #15 of the PHP installation guide?

Peace...
 
Old 04-24-2006, 09:34 PM   #14
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
I was using something different. Ok, so I have to do those steps. Where in the config file so I enter that information in for PHP5? Just tried to enter it somewhere and save and its read only? I did it through GUI not term. I dont know how to change it through terminal googling now

Last edited by Markness; 04-24-2006 at 09:44 PM.
 
Old 04-24-2006, 10:36 PM   #15
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
If you're using some GUI tool to edit the Apache config file, just find other "LoadModule" entries and put the line for PHP5 in next to those other lines. The same goes for the PHP MIME type (the "AddType" line).

Make those two changes to your httpd.conf file and PHP scripts should start executing. You can edit httpd.conf using any text editor you like. DO NOT use a word processor since you will need to save the file as straight text.

Peace...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hello. Problems with apache, (I believe.) $Linuxnoob Fedora 5 04-09-2006 06:51 PM
Problems with Apache XblueorbX Linux - Software 22 08-13-2005 10:31 AM
apache 1.3 problems Dill Linux - Software 4 09-05-2004 06:01 PM
Apache: Several Problems! overbored Linux - Software 5 08-31-2004 11:01 PM
Apache virtualhost problems, apache install problems nyroc Linux - Software 2 06-10-2003 12:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration