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

OGCserver does not work properly through a reverse proxy in WSGI mode #5

Closed
springmeyer opened this issue Nov 22, 2010 · 5 comments
Closed

Comments

@springmeyer
Copy link
Member

OGCserver does not work properly through a reverse proxy in WSGI mode as it binds SERVER_NAME, SERVER_PORT and PATH_INFO. There should be 'onlineresource' parameter in ogcserver.conf in '[server]' group.

patch available: http://trac.mapnik.org/ticket/316

@manelclos
Copy link
Member

Patch is almost ok: it needs to check the 'service' section instead of the 'server' section in ogcserver.conf:

    if self.conf.has_option_with_value('service', 'onlineresource'): 
        onlineresource = '%s' % self.conf.get('service', 'onlineresource') 
    else: 
        onlineresource = 'http://%s:%s%s?' % (environ['SERVER_NAME'], environ['SERVER_PORT'], environ['PATH_INFO']) 

With the corrected patch all urls (GetCapabilities, GetMap, GetFeatureInfo) will use the correct url.

Without the patch only the Service section of the GetCapabilities will show the url specified in the configuration.

@springmeyer
Copy link
Member Author

feel free to apply if it looks good to you. ideally we could have some tests for parsing the conf.

@manelclos
Copy link
Member

Further review shows that the patch was ok. The onlineresource in [service] is already used and should point to some web page of the supporter of the service.
We can keep it simple and create a new config option "base_url" under [service] that will act as the onlineresource for the 3 operations ogcserver supports right now. Or maybe create a [capability] section. What do you think?

@springmeyer
Copy link
Member Author

[capability] section sounds smart, but I'm fine either way. Feel free to commit.

@manelclos
Copy link
Member

New baseurl option in ogcserver.conf, commited in dc07974

This issue was closed.
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