Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th May 2006, 08:55
unkn0wn unkn0wn is offline
Senior Member
 
Join Date: Mar 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Default apache deny/allow

Fo example i have folder forum in /var/www and i want to restrict some access. i want to denz all external ip adreses for forum. onlz local users for 192.168.x.x can use it.
how can i huse htaccess

i create dir temp
i touch .htaccess in temp.
i create htpasswd file in /var/www with onlz username-pass.
i edit htaccess

AuthUserFile /var/www/htpasswd
AuthName "secret
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

Order Allow,Deny
Deny from 212.21.11
Allow from all

but nothing happens

Last edited by unkn0wn; 15th May 2006 at 09:09.
Reply With Quote
Sponsored Links
  #2  
Old 15th May 2006, 15:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Try
Code:
Order Deny,Allow
instead.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 16th May 2006, 08:39
unkn0wn unkn0wn is offline
Senior Member
 
Join Date: Mar 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Default

apache simple dont menage htaccess . i delete entry for allow and deny just to see if auth work. i have code

AuthUserFile /var/www/htpasswd
AuthName "secret
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

but it cant work
Reply With Quote
  #4  
Old 16th May 2006, 11:09
Norman Norman is offline
HowtoForge Supporter
 
Join Date: May 2006
Posts: 242
Thanks: 0
Thanked 18 Times in 14 Posts
Default

What does your error-log say?
And shouldnt' the file point to ".htaccess" instead of "htaccess"?
__________________
http://www.xh.se
Reply With Quote
  #5  
Old 16th May 2006, 11:27
unkn0wn unkn0wn is offline
Senior Member
 
Join Date: Mar 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Default

no its point on .htaccess.
i try to insert code in httpd.conf and its working that way

i dont wanna start new topic but how to disable TRACE method?


RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]

but nikto show that trace method is enabled
Reply With Quote
  #6  
Old 16th May 2006, 16:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Have a look here: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
If you add your rules directly to httpd.conf, you must restart Apache.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 17th May 2006, 08:17
unkn0wn unkn0wn is offline
Senior Member
 
Join Date: Mar 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there is nothing about trace method.
yes i did restart apache.
Reply With Quote
  #8  
Old 17th May 2006, 15:15
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Here are some interesting links: http://www.google.com/search?q=apach...en-US:official
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 18th May 2006, 09:09
unkn0wn unkn0wn is offline
Senior Member
 
Join Date: Mar 2006
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i know that. i google it and find that code i past to you.

Here ya go.

RewriteEngine on
# Optional debug directives
#RewriteLog logs/mod_rewrite.log
#RewriteLogLeve 1
# Block TRACK and TRACE methods
ReWriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) ReWriteRule .* - [F]

but simple dont work
Reply With Quote
  #10  
Old 18th May 2006, 19:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

What happens if you put this directly in your Apache configuration, not in an .htaccess file? Don't forget to restart Apache.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_mono apache 2.2 ColdDoT Server Operation 5 23rd May 2006 02:58
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45
PHP/MySQL/Apache2/ISPConfig configuration issues? senzapaura General 21 25th December 2005 14:01
install apache 1.3 on FC 4 superg Server Operation 1 22nd December 2005 17:44
Apache 1.3 Support SleeperZ General 3 9th November 2005 11:10


All times are GMT +2. The time now is 17:24.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.