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

Enable to run Layman on specific URL path prefix #59

Closed
jirik opened this issue Apr 9, 2020 · 2 comments
Closed

Enable to run Layman on specific URL path prefix #59

jirik opened this issue Apr 9, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@jirik
Copy link
Member

jirik commented Apr 9, 2020

No description provided.

@jirik jirik added the enhancement New feature or request label Apr 9, 2020
@jirik
Copy link
Member Author

jirik commented Jan 14, 2021

Sample Layman configuration for running at specific URL prefix. Just for make start-demo (without Micka and Liferay).

URLs in GET Layer|Map response will be probably wrong (probably https://local.examples/rest/... instad of https://local.examples/layman/rest/...)

Running Layman behind local nginx at https://local.examples/layman

Local nginx configuration

...
server {
    listen 80;
    server_name local.examples;

    client_max_body_size 2m;

...

location /layman/ {
                proxy_set_header        Host $host:$server_port;
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        X-Forwarded-Proto $scheme;
                proxy_pass http://127.0.0.1:8000/layman/; #8000
        }
}

Layman docker-compose.demo.yml file changes

...
   nginx:
      ...
      ports:
        - 8000:80
      ...

Layman .env file, differences from .env.demo

LAYMAN_GS_PROXY_BASE_URL=https://local.examples/layman/geoserver
LAYMAN_PROXY_SERVER_NAME=local.examples
LAYMAN_CLIENT_URL=http://layman_client:3000/layman/client/
LAYMAN_CLIENT_PUBLIC_URL=https://local.examples/layman/client/
LTC_BASEPATH=/layman/client

CSW_*=...
OAUTH2_*=...

@jirik
Copy link
Member Author

jirik commented Oct 5, 2023

Similar behaviour could be achieved with X-Fowarded HTTP headers (#868)

@jirik jirik closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant