LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Closed Thread
 
Search this Thread
Old 07-27-2006, 05:36 PM   #1
JDMs14
LQ Newbie
 
Registered: Jan 2006
Posts: 4

Rep: Reputation: 0
.htaccess issue - CentOS


Greetings all,


I've created an .htaccess file in the root of my web server (/var/www/html) to block 1 particular ip from accessing the site.

Here it is:

<Files .htaccess>
deny from all
</Files>
deny from ***.***.***.***

Fairly simple right? Everything works fine...i've tested it from that particular IP and the user couldnt access anything. For example: mysite.com/games or mysite.com/pics would return a 403 unauthorized page like it should.

My problem lies in that when the person visits www.mysite.com they don't get the 403 error page. They get the CentOS Apache test page. I'm totally dumbfounded as to what is causing this...can anyone shed some light?


Thanks!
 
Old 07-28-2006, 10:00 AM   #2
timjowers
LQ Newbie
 
Registered: Apr 2006
Posts: 27

Rep: Reputation: 15
What is the error page in httpd.conf?

Quote:
Originally Posted by JDMs14
Greetings all,
I've created an .htaccess file in the root of my web server (/var/www/html) to block 1 particular ip from accessing the site.
Here it is:
<Files .htaccess>
deny from all
</Files>
deny from ***.***.***.***
...
Thanks!
Just a thought....
Can you access /etc/httpd/conf/httpd.conf? (s/httpd/apache/)
maybe an error page can be configured there. I'm not cognizant of an "htaccess deny" error page but haven't researched it.
 
Old 07-29-2006, 05:01 AM   #3
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Quote:
Originally Posted by JDMs14
My problem lies in that when the person visits www.mysite.com they don't get the 403 error page. They get the CentOS Apache test page. I'm totally dumbfounded as to what is causing this...can anyone shed some light?
Check your apache error log. Probably apache can't read your .htaccess file and is complaining about it.
 
Old 09-15-2009, 03:58 PM   #4
29t88
Member
 
Registered: Jan 2009
Distribution: CentOS 5.3
Posts: 62

Rep: Reputation: 17
If you still have this issue:
Make a custom 403 error page
add this to the .htaccess
ErrorDocument 403 /403.html
and have the contents of the error file in there.
 
Old 09-15-2009, 04:20 PM   #5
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
29t88, please don't bring dead threads back to life (necroposting). We value your time and energy, and encourage you to spend it helping members with current issues. I'm closing this zombie thread so it may rest in peace.
 
  


Closed Thread


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
installing centos from DVD issue vbsaltydog Linux - Hardware 0 04-19-2006 09:30 PM
Issue with firewire drive on Linux (CentOS) nmurali2 Linux - Hardware 4 01-31-2006 08:25 PM
.htaccess mod_rewrite issue Jukas Linux - Software 2 12-13-2005 12:23 PM
some help with CentOS PHP issue please! renegadeavenger Red Hat 5 08-08-2005 08:33 PM
.htaccess .htpasswd issue Robin01 Linux - Newbie 4 12-24-2003 03:36 PM


All times are GMT -5. The time now is 10:51 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration