Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to rewrite URLs? #551

Open
RicoHoff opened this issue Jul 20, 2023 · 4 comments
Open

Is it possible to rewrite URLs? #551

RicoHoff opened this issue Jul 20, 2023 · 4 comments

Comments

@RicoHoff
Copy link

RicoHoff commented Jul 20, 2023

Hello,

I would like to use the image with docker-commpose.yml and rewrite the URLs so that I can specify the filename of the map in the path (without path and .map).

default:
http://your.mapserver.host/?map=/etc/mapserver/mapfile.map&service=WMS&request=GetCapabilities

requested:
http://your.mapserver.host/map/mapfile?service=WMS&request=GetCapabilities

The rewrite module is apparently not enabled by default in the image and my attempts to do so have unfortunately failed so far.
Is there an easy way to enable this via config? And if this works, do I additionally need to change something in the MS_MAP_PATTERN environment variable so that I don't get an error due to missing map parameter?

@sbrunner
Copy link
Member

For that, you can use the MS_MAPFILE environment variable :-)

@RicoHoff
Copy link
Author

Yes - as long as I have only one mapfile, right? However, I am looking for a solution for different mapfiles. All mapfiles are in the same folder.

http://your.mapserver.host/map/mapfile1?service=WMS&request=GetCapabilities
http://your.mapserver.host/map/mapfile2?service=WMS&request=GetCapabilities
http://your.mapserver.host/map/mapfile3?service=WMS&request=GetCapabilities
and so on

@sbrunner
Copy link
Member

@RicoHoff
Copy link
Author

no, but I will be happy to take a look
thanks first for the tip - i'll get back to you :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants