LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-25-2013, 01:21 AM   #1
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Rep: Reputation: Disabled
http Permission


I have added the Directory directive to my httpd.conf file

Code:
<Directory "/var/www/html/privatefiles">
Order allow,deny
Allow from virtual1.example.com
</Directory>
My pc hostname is virtual1.example.com and according to this only virtual1.example.com must access that directory, but when I try to visit the path http://virtual1.example.com/privatefiles , it says

"You don't have permission to access /privatefiles

However, when I use

Code:
<Directory "/var/www/html/privatefiles">
Order allow,deny
Allow from virtual1.example.com 172.24.0.2
</Directory>
I can access the directory.
 
Old 03-25-2013, 01:36 AM   #2
DinoFly
Member
 
Registered: Nov 2007
Distribution: Fedora, CentOS,
Posts: 72

Rep: Reputation: Disabled
Quote:
Originally Posted by sunveer View Post
I have added the Directory directive to my httpd.conf file

Code:
<Directory "/var/www/html/privatefiles">
Order allow,deny
Allow from virtual1.example.com
</Directory>
My pc hostname is virtual1.example.com and according to this only virtual1.example.com must access that directory, but when I try to visit the path http://virtual1.example.com/privatefiles , it says

"You don't have permission to access /privatefiles

However, when I use

Code:
<Directory "/var/www/html/privatefiles">
Order allow,deny
Allow from virtual1.example.com 172.24.0.2
</Directory>
I can access the directory.
can you check if your http server can translate virtual1.example.com to 172.24.0.2

Code:
nslookup virtual1.example.com
 
Old 03-25-2013, 02:26 AM   #3
DinoFly
Member
 
Registered: Nov 2007
Distribution: Fedora, CentOS,
Posts: 72

Rep: Reputation: Disabled
Quote:
Originally Posted by DinoFly View Post
can you check if your http server can translate virtual1.example.com to 172.24.0.2

Code:
nslookup virtual1.example.com
In the cause that the server can not resolve it, you can add it do your dns server or local file to resolve it "/etc/hosts"

Otherwise send some logs of the error file of that particular site.
 
Old 03-25-2013, 04:49 AM   #4
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Error Log

[error] [client 172.24.0.2] client denied by server configuration: /var/www/html/privatefiles

DNS resolving is working perfectly.
 
Old 03-25-2013, 05:11 AM   #5
DinoFly
Member
 
Registered: Nov 2007
Distribution: Fedora, CentOS,
Posts: 72

Rep: Reputation: Disabled
It also requires reverse lookup

check the site https://httpd.apache.org/docs/2.0/mod/mod_access.html under A (partial) domain-name section
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache: http://localhost (work) http://ipaddress (not working) sarmad Linux - Newbie 7 02-05-2013 07:47 AM
How to block HTTP requisitions with invalid/blank http referer field brgsousa Linux - Software 2 10-18-2010 02:49 PM
Apache: Change http://localhost to http://www.mywebsite.com mlandvo Linux - Server 1 08-12-2010 08:47 AM
[SOLVED] Adding package sources fails saying "http://http not found skykooler Ubuntu 2 07-02-2010 09:32 AM
monodoc-http gives a http 500 internal server error ernesto_cgf Linux - Software 0 05-10-2007 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:02 AM.

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