LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-26-2005, 01:14 PM   #1
MandrivaUser
Member
 
Registered: Jul 2005
Location: Boston, MA
Posts: 32

Rep: Reputation: 15
Apache2


I really need your help to end my days of frustration.
I installed Apache2, PHP and Mysql on my Linux box. After configuring my http.conf such as adding lines below:

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>

AddType application/x-httpd-php .php

AddType application/x-httpd-php .php3
AddType application/x-httpd-php .phtml

Unfortunately, apache2 can't seem to parse my php scripts.
I set up a local linux server for web development, and it sets to a default name localhost which is also used in httpd.conf file as the server.

My documentroot is pointed to "/var/www/html/htdocs/" and that's where I put all my files. I have been typing for example /var/www/html/htdocs/index.php to view the page I created. Is this correct or should I somehow include localhost in the address bar?

Your help will be greatly appreciated it.

Thank you,

MandrivaUser
 
Old 07-26-2005, 02:30 PM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
If you type /var/www/html/docs/file.php You get the file directly, without any interferance from apache. So, youll have to use an url to get apache in between. So something like: http://localhost/docs/file.php would be more appropriate.
 
Old 07-27-2005, 08:25 AM   #3
MandrivaUser
Member
 
Registered: Jul 2005
Location: Boston, MA
Posts: 32

Original Poster
Rep: Reputation: 15
Thank you so much for your reply. By doing so, here is an error message I got:
##
Object no found!

The request URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.


Error 404

localhost
wed Jul 27 09:18:39 2005
Apache/2.0.47 (Linux/SuSE)

##

I have tried typing many times and I am sure that my spelling is correct and all files are located on folder.

http://localhost/svr/www/htdocs/index3.php

Displayed the message shown above.

Any idea ?

Thank you

MandrivaUser
 
Old 07-27-2005, 08:28 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
The URL should be http://localhost/index3.php.

Last edited by Nylex; 07-27-2005 at 08:31 AM.
 
Old 07-27-2005, 08:30 AM   #5
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
If your documentroot in httpd.conf is set as /var/www/html, then thats where the root begins. So, http://localhost/file points to /file in the document root, so in your filesystem to /var/www/html/file. Get it? (:
 
Old 07-27-2005, 08:42 AM   #6
MandrivaUser
Member
 
Registered: Jul 2005
Location: Boston, MA
Posts: 32

Original Poster
Rep: Reputation: 15
Thank you so much guys. It worked!!!

MandrivaUSer
 
  


Reply



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
Apache2.0.52, t1lib-5.0.2, php-apache2-5.0.2 wizard7423 Slackware 2 04-04-2011 08:09 PM
Apache2 apache2-common WebDav timgerr Linux - Networking 1 08-25-2005 09:41 PM
how to uninstall apache2 which is installed by emerge apache2 flybirdlong Linux - Software 1 07-17-2004 11:46 AM
A little help with apache2 FearPasion710 Linux - Software 1 10-12-2003 06:07 PM
Apache2 help! FearPasion710 Linux - General 3 10-04-2003 02:11 PM

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

All times are GMT -5. The time now is 07:16 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