namsral / multipass

Better authentication for HTTP
BSD 3-Clause "New" or "Revised" License
73 stars 4 forks source link

BUG: multipass root url not working correctly #15

Closed snowywolf closed 7 years ago

snowywolf commented 7 years ago

Not sure if this is a bug with caddy or multipass. but when trying to access the protected resource it's not doing anything. chrome console: Failed to load resource: the server responded with a status of 404 () https://domainname.com/multipass?...

Probably because it should be https://domainname.com/examplecontrolpanel/multipass?... (If i manually go there it sorta works)

This is my caddyfile, i have tried it with and without basepath and resources set

https://domainname.com { root /mnt/volume-nyc1/www fastcgi / unix:/run/php/php7.0-fpm.sock php }

https://domainname.com/examplecontrolpanel/ { root /mnt/volume-nyc1/examplecontrolpanel fastcgi / unix:/run/php/php7.0-fpm.sock php multipass { handles agmailemail smtp_addr smtp.gmail.com:465 smtp_user mygmailemail smtp_pass mygmailpassword mail_from "Multipass no-reply@domainname.com" } }

namsral commented 7 years ago

The default location for multipass' log-in and sign-out page is /multipass. For a custom path set the basepath:

multipass {
    basepath /examplecontrolpanel
    ...
}
snowywolf commented 7 years ago

I have tried that. multipass then tries loading from /examplecontrolpanel/examplecontrolpanel

namsral commented 7 years ago

The Multipass directive is designed to be embedded in your site configuration, using your example:

https://domainname.com {
    root /mnt/volume-nyc1/www
    fastcgi / unix:/run/php/php7.0-fpm.sock php
    multipass {
        multipass /examplecontrolpanel
        handles agmailemail
        smtp_addr smtp.gmail.com:465
        smtp_user mygmailemail
        smtp_pass mygmailpassword
        mail_from "Multipass <no-reply@domainname.com>"
    }
}

This should allow you to access Multipass on https://domainname.com/examplecontrolpanel .

namsral commented 7 years ago

No response from OP, closing issue.