LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-20-2007, 11:45 AM   #1
av.dubey
Member
 
Registered: Nov 2007
Posts: 148

Rep: Reputation: 15
Unhappy 403 forbidden :You don't have permission to access /hi.html on this server.


iam using fedora 6
checked apache server ...running and showing the default page @http://localhost
made an html file named "hi.html"
<html><body><h1>HI HTML</h1></body></html>

now when iam typing http://localhost/hi.html in firefox web browser
iam getting an error as

Forbidden

You don't have permission to access /hi.html on this server.
Apache/2.2.3 (Fedora) Server at localhost Port 80

i have already typed these
chown -R apache:apache /var/www/html/

and
chmod 755 /var/www/html/hi.html

still iam getting this error

plzz do help me ...as m new to linux n hav got stuck in this ....
 
Old 12-20-2007, 12:40 PM   #2
Caesar Tjalbo
Member
 
Registered: Aug 2006
Location: Ņuņoa
Distribution: KaOS
Posts: 94

Rep: Reputation: 16
I can't help you with this. Perhaps someone else can and you may want to add whether you've restarted Apache and whether you're using SELinux.
Apache is a service/ daemon called "httpd", there's a config utility for services somewhere under system administration or similar which allows you to start and stop services. SELinux is administrated in the same utility as the firewall, if I recall correctly, and you can see in what setting it is, like 'disabled' or 'enforcing'. Via a console/ terminal you can go to the /var/www/html/ directory and type
Code:
ls -alZ
ls lists the contents of a directory, a = all files, l = long notation, Z = SELinux security context. I don't know if it's relevant but it never hurts to copy the output here. SELinux is often on with Fedora and it has bugged me before when working on a site on localhost.
 
Old 12-20-2007, 01:33 PM   #3
av.dubey
Member
 
Registered: Nov 2007
Posts: 148

Original Poster
Rep: Reputation: 15
well i came up with the above fault by using chmod and chown commands..
but now my server is displayin normal html pages in the html dir but when im opening a cgi script which i have pasted in /cog-bin directory its givin the following error

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
root@localhost and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache Server at localhost Port 80</address>
</body></html>
 
Old 12-21-2007, 12:10 AM   #4
LinuxCrayon
Member
 
Registered: Nov 2007
Location: Georgia, USA
Distribution: FreeBSD
Posts: 274

Rep: Reputation: 31
Quote:
Originally Posted by av.dubey View Post
<p>More information about this error may be available
in the server error log.</p>
So...did you check your error log? What are the contents?
 
  


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
Forbidden You don't have permission to access / on this server tekmann33 Linux - Software 4 06-16-2009 03:17 AM
"Forbidden / You don't have permission to access /~user/index.html on this server." honglin_8 Linux - Newbie 8 10-30-2007 08:41 AM
httpd 403 forbidden index.html question Amuro-Ray2020 Linux - Server 1 07-11-2007 07:00 PM
Apache: 403 Forbidden, You don't have permission baosheng Linux - Server 1 03-23-2007 03:45 AM
403 You don't have permission to access /index.html on this server. xpucto Linux - Networking 6 06-06-2006 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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