How can I allow/deny a layer if I browse the map from Intranet/Internet?

Camden Daily cdaily at GMAIL.COM
Thu Mar 17 10:42:12 EST 2005


I would strongly suggest using mapscript to get the desired results.
With mapscript, it would be quite simple to just check the ip of the
person requesting the page and set different layers to be turned off
accordingly.

If you're going to be confined to using the cgi-bin mapserver, you
might look into mod_suexec for apache.  You can use it to define a
different user/group that cgi apps will be run as for different
virtual hosts.  Then, you could set your layers with permissions that
only make them available for the specific user or group that should
have access.

-Camden

On Thu, 17 Mar 2005 10:23:27 +0100, Daniele Margotti
<margottid at comune.lugo.ra.it> wrote:
>
> Hi list,
> I have a layer with ortophotos: I can legally use these ortophotos in
> Intranet application, but I cannot/won't show them I someone browses the map
> from Internet.
>
> I use cgi-bin Mapserver on a server that is both on the Intranet and on the
> Internet.
>
> Is there a way to block the visualization of ortophotos layer if the request
> comes from the Internet?
>
> Unfortunately, I cannot use two different templates (one with "ortophotos
> checkbox", and one without it) since everyone can "create" his own map using
> cgi-bin Mapserver syntax (and activate/deactivate layers even if they are
> not in the template).
>
> Perhaps this is a more Apache-related question...
> I can configure my Apache with many VirtualHosts (based on the ServerName,
> that is different if accessed from Intranet or from Internet), but I need ad
> idea to prevent Mapserver reading certain files (or certain directories) if
> invoked from Intranet or from Internet.
>
> Can you help me?
>
>     Daniele
>



More information about the mapserver-users mailing list