LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 12-05-2005, 09:26 AM   #1
LAdProg2005
Member
 
Registered: Oct 2005
Posts: 50

Rep: Reputation: 15
serious apache misconfiguration


I am using apache as my webserver.

in my httpd.conf

Document root is /var/www/html/
Directory is /var/www/html/

now when I try to put a directory within it:

/var/www/html/nmap-web/

and try to run a php script

http://localhost/nmap-web/index.php

it doesn't run. it gives a 403 forbidden erro. All the permissions are set rite. php is enabled and yet the problem continues to exist.

Is there a way to access this directory somehow? Do I have to change anything in httpd.conf? I don't know, can anyone point me to right direction?

Thank you
--p
 
Old 12-06-2005, 02:09 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 9,608

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
Take a look at the apache error_log to see what's the problem.
 
Old 12-06-2005, 02:37 AM   #3
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 45
When you say all the permissions are set right, what do you mean? What files/directories have you checked the permissions for? did you check that /var, /var/www, /var/www/html, /var/www/html/nmap-web, and /var/www/html/nmap-web/index.php had the correct permissions? all directories in the document root path needs to be 755. php, i'm not sure if it's 644 or 755, but it's one of those. If it's not permissions, I can think of a couple of things. Check the user and group (User and Group in httpd.conf) apache is running under. Although, if you're permissions are right, apache should still be able to access those resources no matter what the user or group is. The other thing I can think of is, did you add a php handler (AddHandler php-script .php)?

And check the error_log suggested earlier.
 
Old 12-06-2005, 10:58 AM   #4
LAdProg2005
Member
 
Registered: Oct 2005
Posts: 50

Original Poster
Rep: Reputation: 15
Yes, i made sure permissions were 755. module is added directory index is added but still it doesn't go through. error log and access log doesn't give me anything. before it said file not found. when i run it in browser it gives me 403 permission denied. i have working on this since a week now and i don't know what exactly is going wrong. i checked my httpd conf file setting are rite...permissions are rite for the directories still something is wrong. If it was malfunction code shouldn't it give me an internal error?

its all running as root

any help is appreciated.
thanks
--p
 
Old 12-14-2005, 10:47 PM   #5
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 45
I was just thinking, in the <Directory> directive for you document root, are your options set to allow the running of scripts and what-not? I'm not sure what apache sees php as, but it could be something to look at since by default apache doesn't let a whole lot of options happen.
 
Old 12-15-2005, 02:47 AM   #6
spookt
LQ Newbie
 
Registered: Dec 2003
Location: North East UK
Distribution: Red Hat / Fedora
Posts: 11

Rep: Reputation: 0
What distro are you running ?

If you're running SELinux (FC3/4 or recent RedHat AS/ES) then the context of the file may be wrong.

Do a ls -Z in the directory to show the SELinux file contexts. If your file is different you need to do something like chcon --reference=/var/www/html <file>. Check the results with another ls -Z.

Hope this helps
Paul
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS misconfiguration or what is wrong here? rebayona Linux - Networking 10 09-27-2005 04:32 AM
boot loader misconfiguration ... Bhagiratha Linux - Software 2 09-16-2005 08:28 PM
SSL CA misconfiguration -- HELP! Chuck23 Linux - Networking 1 01-24-2005 02:56 PM
PHP misconfiguration J_Szucs Linux - Software 0 09-12-2003 12:46 PM
another sendmail misconfiguration? GraemeK Linux - Networking 7 09-08-2003 02:58 PM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration