Block one side

Alles, was den Apache betrifft, kann hier besprochen werden.

Block one side

Postby nightmare11at » 19. December 2013 11:43

Hi! I am running an Apache 2.4 Server under Windows 2008 R2 in a DMZ. And i am running a Tomcat Server in an internal network. My Apache Server simply acts as a proxy for the tomcat. Now all works fine, but i want the apache to not proxypass 1 specific site to the internet. is that possible?
nightmare11at
 
Posts: 2
Joined: 19. December 2013 11:39
Operating System: Windows Server 2008 R2

Re: Block one side

Postby Nobbie » 19. December 2013 11:47

Should be. Without further knowledge difficult to say, but you may for example use <Location ...> and prohibit access.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Block one side

Postby nightmare11at » 19. December 2013 12:01

OK, i did play around with that in httpd.conf (or should i do that in httpd-ssl.conf as the server is access via https?) and when i enter the following then the apache doesn't start anymore:
Code: Select all
<Location /subdir1/subdir2>
  <Files sample.html>
    Order Allow,Deny
    Deny from all
    Allow from x.x.x.x
  </Files>
</Location>


I have other files in subdir2 that should still be accessible!
nightmare11at
 
Posts: 2
Joined: 19. December 2013 11:39
Operating System: Windows Server 2008 R2

Re: Block one side

Postby Nobbie » 19. December 2013 12:56

nightmare11at wrote:OK, i did play around with that in httpd.conf (or should i do that in httpd-ssl.conf as the server is access via https?) and when i enter the following then the apache doesn't start anymore:
Code: Select all
<Location /subdir1/subdir2>
  <Files sample.html>
    Order Allow,Deny
    Deny from all
    Allow from x.x.x.x
  </Files>
</Location>


a) Watch out for Apache Error Log, it should tell you why it does not start.

b) anyway, your Order-Clause is wrong. That leads to a compleletey blocked location, "Deny from All" is executed AFTER the Allow From Clause (that is the idea of the Order Clause, the following Deny/Allow clause are NOT executed top to bottom, but as you defined in the Order Clause).
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 22 guests