0

I have two servers, one of which is solely running Atlassian Confluence (no apache installed), the other is a DMZ server which is used as a reverse proxy server (mod_proxy), pointing the address http://confluence.office.company.com to http://confluence.

I also want Apache on the reverse proxy server to redirect the page /browsepeople.action to the index page ("/").

The following did not work, and appears to do nothing in terms of redirect (the page still loads).

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName confluence.office.company.com

    ProxyRequests off
    ProxyPass /  http://confluence/
    ProxyPassReverse / http://confluence/

    Redirect 301 /browsepeople.action http://confluence.office.company.com/

</VirtualHost>

What is needed to re-direct requests from this page to stop it being displayed? It doesn't even have to be a re-direct, I just want people to not be able to visit the /browsepeople.action page.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Steve_R
  • 31
  • 1
  • 2

1 Answers1

0

Try this:

ProxyPass /error !
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
ErrorDocument 404 /error/HTTP_FORBIDDEN.html.var

RewriteEngine on
RewriteRule ^/browsepeople.action    - [F,L,P]
Scott Dudley
  • 3,256
  • 1
  • 18
  • 30
  • No affect I'm afraid. Does the Rewrite stuff rely on the .htaccess file being there? Confluence is not installed under apache so it doesn't have that file in the directory. – Steve_R Feb 06 '15 at 09:53
  • No, the above goes straight into the VirtualHost configuration and it doesn't depend on any `.htaccess`. I use a similar proxy configuration in front of my Confluence to block certain URLs and it works fine for me, so it's a little puzzling. I assume that you restarted HTTPD before testing, right? What version of HTTPD? And are you sure that mod_rewrite is loaded? (`sudo apachectl -t -D DUMP_MODULES|grep -i rewrite`) Maybe turn on RewriteLog if all else fails? – Scott Dudley Feb 06 '15 at 13:50
  • @steve-r, I think I forgot to copy something from my own configuration. Check out the additional ProxyPass and ErrorDocument lines in my updated answer. – Scott Dudley Feb 06 '15 at 21:58