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

[0.17.1] Hosted via Caddy, page refresh gives 404 if it's not the home page #291

Open
skygunner opened this issue Mar 27, 2023 · 0 comments

Comments

@skygunner
Copy link

skygunner commented Mar 27, 2023

Hi, I used the example caddy config from here
https://docs.netmaker.org/server-installation.html#caddy
opening the home page, clicking all the pages work fine.
However on any page that is not the home page, a refresh would give 404.
Any idea what's the cause?

`{
        email [email protected]
}

\# Dashboard
https://dashboard.netmaker.foobar.com {
        # Apply basic security headers
        header {
                # Enable cross origin access to *.netmaker.foobar.com
                Access-Control-Allow-Origin *.netmaker.foobar.com
                # Enable HTTP Strict Transport Security (HSTS)
                Strict-Transport-Security "max-age=31536000;"
                # Enable cross-site filter (XSS) and tell browser to block detected attacks
                X-XSS-Protection "1; mode=block"
                # Disallow the site to be rendered within a frame on a foreign domain (clickjacking protection)
                X-Frame-Options "SAMEORIGIN"
                # Prevent search engines from indexing
                X-Robots-Tag "none"
                # Remove the server name
                -Server
        }
    root * /var/www/netmaker
    file_server

  log {
    output file /var/log/caddy/dashboard-access.log
  }
}

\# API
https://api.netmaker.foobar.com  {
        reverse_proxy http://127.0.0.1:8081
}

\# MQ
wss://broker.netmaker.foobar.com {
        reverse_proxy ws://127.0.0.1:8883
`
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

1 participant