Skip to content
Discussion options

You must be logged in to vote

You don't need VIRTUAL_PATHs indeed. Sorry the Per-VIRTUAL_HOST settings is what you need.

For example, if you have a virtual host named app.example.com, you could provide a custom configuration for that host as follows:

create your virtual host config file:

# content of the app.example.com file
location /admin {
    # Restrict access to only some IP (LAN IP & VPN)
    allow 172.16.0.0/12;
    deny all;
}

mount it to /etc/nginx/vhost.d/app.example.com
Check the Docker Compose File example in the linked documentation how to mount this file in your container.
This will automatically include your config with /admin location as an additional location block.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@beechfuzz
Comment options

@SchoNie
Comment options

Answer selected by buchdag
@oussjarrousse
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants