Re: Apache VirtualHost Restriction

From: Mohammad Nadim <nadim.attari_at_gmail.com>
Date: Fri, 1 May 2015 00:11:23 +0400

Hello Yuv,



On 30 April 2015 at 20:18, Yuv Joodhisty <locustv2_at_gmail.com> wrote:

> Hello guys,
>
> Does anyone have any idea how to tackle this problem?
> I need a virtual host which should be:
>
> - accessible locally but not publicly
> - may be accessible by some remote users
> - those remote users doesn't have a static ip
>
>

I'm no sysadmin, so they'll answer you better.

BTW, see this link:
https://www.linode.com/docs/websites/apache-tips-and-tricks/rulebased-access-control-for-apache

Dunno if it's possible, but give a try. Configure Apache to

   - Allow all from intranet
   - If not from intranet, then check whether some parameter is set in HTTP
   header sent by browser to the server
   - If yes, allow access
      - Else redirect to a page displaying "You are not allowed to access
      this resource, etc"

Since you have **some** remote users, you can ask them to install a plugin
on their browsers (say Firefox) that automatically modifies the HTTP header
that is sent to the server (the plugin adds the parameter Apache is going
to check). Up to you to develop this Firefox plugin and distribute to your *
*some** remote users :-)

Else use a VPN.

Hope it helps.

Best regards,
Nadim Attari

p.s.: Modify this plugin to develop yours.
https://github.com/garethhunt/modifyheaders
Received on Thu Apr 30 2015 - 20:11:38 PST

This archive was generated by hypermail 2.3.0 : Thu Apr 30 2015 - 20:18:04 PST