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

Allow subpath for login #36

Closed
duylong opened this issue May 2, 2020 · 2 comments
Closed

Allow subpath for login #36

duylong opened this issue May 2, 2020 · 2 comments

Comments

@duylong
Copy link

duylong commented May 2, 2020

Hi,

I have a problem when I click on the button Sign in. It redirect me to /login.html, but my real url is /subpath/login.html

Can you add a option for this feature?

Best regards,

@nook24
Copy link
Member

nook24 commented May 3, 2020

I added support for this. Unfortunately for now it is required to manually patch the file /public/index.html

<!--
If you need to run Statusengine in a sub-directory, you need to change this to
<base href="/statusengine/"> for example. Make sure it ends with / !
Please see this issue https://github.com/statusengine/interface/issues/36
why this is not available in the config yet.
-->
<base href="/">

For example:

<base href="/statusengine/">

Why is there no config option yet?

For now the index.html is a HTML file. So no PHP is available. Renaming the file to .php could break some web server configurations which I do not want.
Maybe I will change this with the next larger version update.

Example Apache Config

Alias /statusengine /usr/share/interface/public

<Directory /usr/share/interface/public>
    Options SymLinksIfOwnerMatch
    DirectoryIndex index.html

    <IfModule mod_php7.c>
        php_admin_value open_basedir /usr/share/interface
    </IfModule>

</Directory>

Use subdomains

I would recommend to use a subdomain statusengine.example.org instead of a subdirectory example.org/statusengine. I was used to subdirectories in times where SSL certificates costs money.
Since we have Let’s Encrypt subdomains are a much smoother way. At least for me.

@duylong
Copy link
Author

duylong commented May 3, 2020

I avoid creating an application by subdomain. I prefer to group by family of products. Thanks for the tip, it suits me too :)

@duylong duylong closed this as completed May 3, 2020
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