We help IT Professionals succeed at work.

Apache /var/www/html php pages setup

newbieexpert
newbieexpert asked
on
773 Views
Last Modified: 2008-01-09
Hello all !!

I have several php pages arranged in folders and subfolders. I am using apache, php for the first time. I just did a test on apache and see a page called phpinfo.php properly. It is on /var/www/html.  however when i place my php pages directory in /var/www/html  and access a page in it,  it gives a forbidden error. i.e when i access /var/www/html/myapp/1/test.html   it gives a Forbidder error. i then placed test.html in /app folder directly instead of /app/1 and tested. same error. btw the second line says "you don't have permission to access /app/test.html on this server". i don't think it is permissions problem. Permissions are all set to 755. If you have any ideas on how to get this working, please let me know.
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Hi, the php version is 5.1.2. I changed the directory permissions from 755 to 644 using chmod app. No luck. to restate, /var/www/html/test.htm works fine but /var/www/html/app/test.html won't work and displays forbidden and 403 error on http://localhost/app/test.htm page.  

I am not sure if suexec is enabled here. I searched a lot for suexec but didn't find much info about it on fedora+apache. Thank you

Author

Commented:
Firekool:
I have not found suEXEC on my system yet. and  /usr/local/apache/sbin/suexec doesn't exist...
Thanks

Commented:
What version of apache are you using?
What are the permissions on the file?
CERTIFIED EXPERT
Most Valuable Expert 2015
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
i changed the permissions of the files in app directory to 644. and 755 to app directory..

also ran this command found on the web ..

chcon  -R  -h  -t  httpd_sys_content_t    /var/www/html/bcd

i am not sure what resolved the 403 problem here...

thanks both! appreciate it.


Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.