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

Running Polr with no public access #570

Open
ifuchs opened this issue Oct 26, 2020 · 7 comments
Open

Running Polr with no public access #570

ifuchs opened this issue Oct 26, 2020 · 7 comments

Comments

@ifuchs
Copy link

ifuchs commented Oct 26, 2020

If I wish to run an instance of Polr that is restricted to logged in users, is it as simple as setting the public instance option to FALSE or is there more required?

@DBX12
Copy link

DBX12 commented Oct 26, 2020

It is sufficient to set said option to false. It shows the inputs but once you click "shorten" it says you need to log in.
Of course you can use follow already shortened links.

Edit: changed ambiguous wording

@ifuchs
Copy link
Author

ifuchs commented Oct 26, 2020

Thank you. Am I correct that if my domain is my.domain then local files that were heretofore accessible as my.domain/filename must now be accessed at www.my.domain/filename? In order to continue using the original name for the local file (it is used in some shortcuts), could I create a shortened url for www.my.domain/filename?

@DBX12
Copy link

DBX12 commented Oct 26, 2020

I'm not sure if I understood you correctly. According to the setup guide, you have to point the document root of your website to the public folder of this project. So any files outside of the public folder would not be accessible at all.
Inside the public folder, all requests are redirected to the index.php which handles all requests.

So long story short, I probably cannot access other files on your domain.

@ifuchs
Copy link
Author

ifuchs commented Oct 26, 2020 via email

@DBX12
Copy link

DBX12 commented Oct 26, 2020

If you use an Apache2 webserver and the .htaccess can be parsed (that depends on your webserver settings), you can reach all files sitting i the public directory (so you have to move the files you want to access there).
That is not the recommended approach as it might lead to conflicts with the shorturls, as you already figured. With the scenario I just described, you would only get the static file, the shorturl will not be accessible.

The best solution for your usecase would be having polr installed as a subdomain (e.g. http://s.my.domain/)

@ifuchs
Copy link
Author

ifuchs commented Oct 26, 2020 via email

@DBX12
Copy link

DBX12 commented Oct 26, 2020

Assuming http://www.my.domain hosts polr and http://my.domain/ hosts the actual file, and both are independent webspaces, that would work.
However, it is basically living standard to have the hosts www.domain.tld and domain.tld interchangeable and redirecting to one (e.g. https://www.github.com redirects to https://github.com), I would propose to use a different subdomain.

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