[mapserver-users] mapcache behind nginx with ssl

2021-09-27 Thread Trygve Aspenes

Hi there

I have put up a mapserver behind nginx with ssl and a curl like this

curl -s 
"https://mapserver/cgi-bin/mapserv?map=/data/mapserver/map-files/mapserver-8505ad3e-f9e3-4de3-a080-8253443ac954-20210908T120432Z.map&service=WMS&request=GetCapabilities"; 
| grep OnlineResource


Gives me like:

 http://www.w3.org/1999/xlink"; 
xlink:href="https://mapserver/cgi-bin/mapserv?map=/data/mapserver/map-files/mapserver-8505ad3e-f9e3-4de3-a080-8253443ac954-20210908T120432Z.map&"/>
  xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="https://mapserver/cgi-bin/mapserv?map=/data/mapserver/map-files/mapserver-8505ad3e-f9e3-4de3-a080-8253443ac954-20210908T120432Z.map&"/>
  xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="https://mapserver/cgi-bin/mapserv?map=/data/mapserver/map-files/mapserver-8505ad3e-f9e3-4de3-a080-8253443ac954-20210908T120432Z.map&"/>
  xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="https://mapserver/cgi-bin/mapserv?map=/data/mapserver/map-files/mapserver-8505ad3e-f9e3-4de3-a080-8253443ac954-20210908T120432Z.map&"/>
  xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="https://mapserver/cgi-bin/mapserv?map=/data/mapserver/map-files/mapserver-8505ad3e-f9e3-4de3-a080-8253443ac954-20210908T120432Z.map&"/>


Yeah you get the idea. Everything perfect with https in the href link. 
Thanks!


So I put up a mapcache which I intend to put up i front of mapserver. 
When I do a similar curl like:


curl -s 
"https://mapcache/mapcache?Overview&map=/data/mapserver/map-files/mapserver-8505ad3e-f9e3-4de3-a080-8253443ac954-20210908T120432Z.map&SERVICE=WMS&REQUEST=GetCapabilities"; 
| xmllint --format - | grep OnlineResource


I get:

http://www.w3.org/1999/xlink"; 
xlink:href="http://mapcache:8090/mapcache?"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://mapcache:8090/mapcache?"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://mapcache:8090/mapcache?"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://mapcache:8090/mapcache?"/>


I here starts the problems. If I do this in eg QGIS, QGIS are told to go 
to the http address with port 8090(mapcache is setup to run on port 8090 
behind the scenes) which is not reachable. It should return https (with 
no specified port, ie. using standard https port) if I understands 
correctly.


And I just cant figure put why.

The configuration for the two are almost identical and I have double and 
tripple check my config.


Any idea what I should check next?

If it could be of any help I could open access to my mapcache server 
running.


Thanks

Trygve

PS: when I test mapcache and mapserver setup locally without ssl and 
nginx in front it works fine.

___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] asking help about using openlayer in mapserver

2021-09-27 Thread Boubacar Bah
hello every body ; recently i try to display a map with openlayers in
mapserver
l created a html file in witch i put a openlayer javascript this is the
code below:



Premiere carte
https://openlayers.org/en/v4.6.4/css/ol.css"; type="text/css">
https://openlayers.org/en/v4.6.4/build/ol.js";>




var raster = new ol.layer.Tile({
 source: new ol.source.OSM()
 });
 var vector = new ol.layer.Vector({
 source: new ol.source.Vector({
 url: '
https://openlayers.org/en/v4.6.4/examples/data/geojson/countries.geojson',
format: new ol.format.GeoJSON(),
 })
 });
 var map= new ol.Map({
 layers: [raster, vector],
 target: 'map',
 view: new ol.View({
 center: [0, 0],
 zoom: 2
 })
 });




I put this file in the htdocs folder in apache and i try to execute this
file in my browser but the browser send a blank page.
now l want to know why the script not work and how l can fix it
thank
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] asking help about importing gdal librarie in apache python

2021-09-27 Thread Boubacar Bah
Thanks a lot!

Le lun. 27 sept. 2021 à 15:16, CASTRO, Emmanuel <
emmanuel.cas...@capgemini.com> a écrit :

> I seldom use MS4W. On Windows I’d rather use Conda Python distribution
> which comes with GDAL binding for Python (cf.
> https://gdal.org/download.html#windows).
>
>
>
> However four you MS4W installation, you can test this, from the MS4W doc :
> https://www.ms4w.com/README_INSTALL.html#gdal-bindings
>
> I think that you are missing an environment variable; maybe you should put
> the GDAL DLL explicitly in the PATH.
>
>
>
> Good luck
>
>
>
> Emmanuel
>
>
>
> *De :* MapServer-users  *De la
> part de* Boubacar Bah
> *Envoyé :* samedi 25 septembre 2021 17:50
> *À :* mapserver-users@lists.osgeo.org
> *Objet :* [mapserver-users] asking help about importing gdal librarie in
> apache python
>
>
>
> This mail has been sent from an external source
>
>
>
> hello everyone ; i work with mapserver apache ; now i want to work with
> gdal library if l  try to import the gdal this  in python  they send me an
> error this  is the error message below:
>
>
>
>
>
>
>
>
>
>
>
>
> *>>> from osgeo import gdal Traceback (most recent call last):   File
> "", line 1, inFile
> "c:\ms4w\Python\lib\site-packages\osgeo\__init__.py", line 21, in 
> _gdal = swig_import_helper()   File
> "c:\ms4w\Python\lib\site-packages\osgeo\__init__.py", line 17, in
> swig_import_helper _mod = imp.load_module('_gdal', fp, pathname,
> description)   File "c:\ms4w\Python\lib\imp.py", line 242, in load_module
>   return load_dynamic(name, filename, file)   File
> "c:\ms4w\Python\lib\imp.py", line 342, in load_dynamic return
> _load(spec) ImportError: DLL load failed while importing _gdal: Le module
> spécifié est introuvable.*
>
> if someone can fix this l will please.
>
> thank advance.
>
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient, you
> are not authorized to read, print, retain, copy, disseminate, distribute,
> or use this message or any part thereof. If you receive this message in
> error, please notify the sender immediately and delete all copies of this
> message.
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] asking help about importing gdal librarie in apache python

2021-09-27 Thread CASTRO, Emmanuel via MapServer-users
I seldom use MS4W. On Windows I’d rather use Conda Python distribution which 
comes with GDAL binding for Python (cf. https://gdal.org/download.html#windows).

However four you MS4W installation, you can test this, from the MS4W doc : 
https://www.ms4w.com/README_INSTALL.html#gdal-bindings
I think that you are missing an environment variable; maybe you should put the 
GDAL DLL explicitly in the PATH.

Good luck

Emmanuel

De : MapServer-users  De la part de 
Boubacar Bah
Envoyé : samedi 25 septembre 2021 17:50
À : mapserver-users@lists.osgeo.org
Objet : [mapserver-users] asking help about importing gdal librarie in apache 
python

This mail has been sent from an external source

hello everyone ; i work with mapserver apache ; now i want to work with gdal 
library if l  try to import the gdal this  in python  they send me an error 
this  is the error message below:
>>> from osgeo import gdal
Traceback (most recent call last):
  File "", line 1, in 
  File "c:\ms4w\Python\lib\site-packages\osgeo\__init__.py", line 21, in 

_gdal = swig_import_helper()
  File "c:\ms4w\Python\lib\site-packages\osgeo\__init__.py", line 17, in 
swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
  File "c:\ms4w\Python\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
  File "c:\ms4w\Python\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed while importing _gdal: Le module spécifié est 
introuvable.
if someone can fix this l will please.
thank advance.
This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users