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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-24-2006, 05:18 PM
|
#1
|
Member
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85
Rep:
|
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.
|
|
|
04-24-2006, 05:32 PM
|
#2
|
Member
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262
Rep:
|
The last character is the number one... change it to lower case L => apachect"hell" not apachect"one"
|
|
|
04-24-2006, 05:36 PM
|
#3
|
Member
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85
Original Poster
Rep:
|
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 ~]$
|
|
|
|
04-24-2006, 05:43 PM
|
#4
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
04-24-2006, 05:48 PM
|
#5
|
Member
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85
Original Poster
Rep:
|
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 ~]$
|
|
|
|
04-24-2006, 05:51 PM
|
#6
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
04-24-2006, 06:01 PM
|
#7
|
Member
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85
Original Poster
Rep:
|
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 ~]$
|
|
|
|
04-24-2006, 06:10 PM
|
#8
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Quote:
Originally Posted by Markness
heres the output. does this mean apache is started and running?
|
Yup.
Peace...
|
|
|
04-24-2006, 07:08 PM
|
#9
|
Member
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85
Original Poster
Rep:
|
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.
|
|
|
04-24-2006, 07:58 PM
|
#10
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
04-24-2006, 08:08 PM
|
#11
|
Member
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85
Original Poster
Rep:
|
After several refreshes, yes Let me try.
|
|
|
04-24-2006, 08:15 PM
|
#12
|
Member
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85
Original Poster
Rep:
|
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?
|
|
|
04-24-2006, 09:08 PM
|
#13
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
04-24-2006, 09:34 PM
|
#14
|
Member
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85
Original Poster
Rep:
|
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.
|
|
|
04-24-2006, 10:36 PM
|
#15
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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...
|
|
|
All times are GMT -5. The time now is 02:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|