Skip to content

Unable to config CTFD at subpath #2906

@vytaux

Description

@vytaux

Hi,

I'm trying to run CTFD at subpath, I have SCRIPT_NAME=/ctfd, and my nginx has /ctfd/ { proxy_pass http://ctfd:8000 } (it's Docker)

So this setup is kinda working as in website loads, assets load, it generates proper urls, HOWEVER I'm not sure it's completely fine.

Currently the issue I'm dealing with is doubled prefix (???). When I go to challenges page when logged in, it's requesting api route https://domain/ctfd/ctfd/api/v1/challenges which 404s.

Thank you!!!

edit:

Did some detective work, so the path (domain in the code) which becomes /ctfd/api/v1/challenges, in the request gets prefixed with urlRoot which is another /ctfd, wtf?

Image Image

Found this in theme files we're using. I think that might be wrong.

Image

FOUND IT - delete this urlRoot prefix line, and it works!

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions