-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Add a URL Base option #72
Comments
I've done all the work on this and it will be in the next release. So, since it's redirecting you, where would you expect it to go? |
@Logvin Does this link help? https://github.com/NancyFx/Nancy/wiki/Hosting-Nancy-with-Nginx-on-Ubuntu#install-nginx PlexRequests.Net is using the Nancy framework. |
I'm waiting for this until I migrate from the meteor version :-) |
No, that hasn't been verified, but I do run all of my services behind an nginx reverse proxy and decided to hold off on moving to PR.Net until I saw that this issue was resolved. |
@mescon What does the meteor version do to fix this issue? |
I run it with: |
So then everything runs under |
yeah exactly..., so for my nginx I just do (proxy-control.conf is just some authentication and other stuff)
|
The important thing is to make sure all clickable items/urls/images/css/js are all with |
The URL did not help, unfortunately. I have NGINX set up and working with CouchPotato and Sonarr no problem. I think @mescon has it right... you are using absolute paths, not relative paths. |
I'm going to create a separate branch to be able to test the fix for this (I do not want to make the changes in the main code yet). Once this is complete are you happy to try it out? |
Here is the custom build that has attempted to fix this, please let me know how you get on. If this works I will merge it into the mail codebase. https://ci.appveyor.com/project/tidusjar/requestplex/build/1.4.50/artifacts |
I'm testing 1.4.54 on this branch; 1.4.50 did not appear to have any changes supporting redirects, unless I'm mistaken. When I launched the app, the console displays "Request Plex is running on the following: http://+:3579/" I assume this string was changed from previous versions to allow subdir support for Plex Requests itself, but there is no setting in the administration pane, and I could not find a configuration file to specify this. Where do we set the base path/subdir for Plex Requests itself? One note on usability: When configuring Couchpotato with the IP/port correct, but the subdirectory not correct, the error supplied is: After correcting this, CouchPotato worked fine. Sonarr, on the other hand claimed to connect successfully with or without the SubDir. This is because Sonarr builds in a redirect at /, I guess. Neat. I thought I was still having issues after this, but it turns out my "Root save directory" was not a valid path. "Something went wrong"; perhaps, at very least, this path should be tested for validity to some degree. Once this was corrected, Sonarr worked correctly with/without the subdirectory specified. |
Hello, the build 1.4.54 is the latest Development branch and is not stable. The build I provided above has specific changes to how we are redirecting content and hopefully will get around the subdir issue. The couchpotato error is difficult to handle as it can vary, the reason it complains about the I agree there could be better error handling with the |
I should have some time tonight (10 hours from this post) to test this out. I'll install the test build and provide feedback. |
@Logvin Thanks. That would help a lot. |
I installed the 1.4.50 build first, but it doesn't appear to have any options for specifying the SubDir for PlexRequests, or for any of the services interfacing with PlexRequests. Using this build, how am I supposed to set SubDirs for any of these things? |
@ruricu Correct, there are no options, it should just work with whatever path you run it under (or virtual directory). If it's set up using nginx to run under |
For one reason or another, I've been using WAMP/Apache handling my reverse proxies. To this end, a configuration like this has been sufficient:
After some trial and error, the only partially-functional configuration I could find for PR.Net is:
I say "partial" in that mydomain.here/req/ correctly redirects to my.domain.here/req/userlogin and displays the basic login page, but all formatting/css/images are missing. Attempting to log in remains on my.domain.here/req/userlogin, but displays only the JSON response {"result":true, "message":null}. Every other link on the page does not respect the relative subdir paths. It seems to me like this implementation is more obscure than what exists in the original PlexRequests, PlexPy, HtpcManager, Sonarr, SickRage, CouchPotato; where an explicit basepath is set in the app's configuration and, after restart, this is where the app is accessible, regardless of your proxy configuration. Is this intended to be more user-friendly than all of its predecessor and partner apps? |
Thank you for your feedback. I did not start this to make it 'more user-friendly', I started it because I wanted to try out a new .Net framework (Nancy). I admit that my experience with Nancy is lacking, but this is the primary reason for me doing this project (you know, all of this work is also done in my spare time). If you are finding it more 'obscure' there is nothing stopping you from using the original version of Plex Requests. Thanks. |
Just for the record.... it doesnt work in the original version of PlexRequests either, and the work you are doing here is flat out amazing. I really appreciate your work on this and will be looking for a way to donate as soon as my next paycheck comes :) |
Thank you @Logvin I have left an issue with the guys at Nancy, they have been amazing assisting me with some of the issues i've had. Hopefully they will be able to point me in the right direction to get this working for you. |
@tidusjar I'm sorry that my feedback came across as dismissive or condescending. That was truly nowhere near my intent. I am genuinely excited about the additional features you've implemented here as compared to the original PlexRequests. What I was trying to convey is that you seem to be "divining" a url base from an external request in a way that is unique to your project when compared to the explicit configuration used in various "sister" applications. From a user-experience perspective, I think someone familiar with these sister applications might be confused to find this explicit configuration missing, and as a result, the asymmetry in the url base for internal and external addressing of this service. It is precisely because of this asymmetry that a simplistic apache mod_proxy does not function. In terms of "user friendliness" and "obscurity", I was merely referring to the configuration of url base functionality, not the PlexRequests.Net project as a whole. Again; sorry to offend, and thanks for your hard work. |
So what I do is run the Nancy self host on 127.0.0.1 and then nginx to proxy calls. That way the Nancy app isnt exposed to the world.
Here's my nginx conf. Now bear in mind this has a load of SSL stuff which you probably don't need just to get a simple demo going but this all works in production.
|
Thanks for the help @jchannon does this work for anyone else? |
@jchannon I gotta admit, what you are doing is a bit above my head. Here is what I have in my NGINX.conf file:
Right now, when I go to domain.com/couchpotato, it loads couchpotato great. When I go to domain.com/requests, the URL is immediately changed to domain.com/userlogin and I get 404. This setup works great for Sonarr and CouchPotato. |
@tidusjar I just installed the custom build you made, it did not help the redirect issue. When I go to domain.com/requests, the URL is immediately changed to domain.com/userlogin |
Found a missing BaseURL spot. Admin registration link for when you are creating a new account. I started with a fresh database. |
Damn! I thought I covered all areas. |
Eh, its a lot of links to check. :) I was able to get registered and get in. Everything else seems to be working along with all my various sonarr, couchpotato, and pushover stuff. |
Excellent, glad to hear! |
eagerly waiting :-) |
@mescon 1.6.1 has been released :) Check the releases page. There is 1 place where the URL base doesn't work and that's when creating a admin |
... which I would probably like to do :) I'll wait for your next push. |
@mescon You can only create 1 administrator currently. So if you are using an existing database you will never go to that page. |
I don't have an existing database, I'm still on the lokenx version! |
When you click the link to make the admin account it will 404. Just add the base url in the address bar and it loads. Create the account and then you are good. Reload the site and your in. Everything else works as expected. Sent from my iPhone
|
Ah cool, will try - thx! |
I think he still has one link to fix. :) |
Correct. I'll leave this open. But I'm not going to push a release out just for that one link :) |
I'm having trouble getting this to work. I install plexrequest and go to localhost:3579 and create an Admin account. I then create a URL base called 'request'. I hit save and then the css disappears. I then restart plexrequest. I have tried localhost:3579 and it gives me 404 page not found. I then try domain/request and I also get 404 page not found. My apache settings are: <Location /request> |
Does http://localhost:3579/request work? |
yes thank you that worked. I changed my reverse proxy settings to: <Location /request> |
All fixed. |
👏 |
Im using the base url "requests" and it seems to work, except when i click on Admin i get the following error.
At this point i am not able to access the admin page to remove the base url. Im using a docker but cant check the version of the app. Edit: saw in the release notes that you can't use base url "requests". Wiped the db and used "request" instead, all good now. |
Maybe there should be a check for reserved URLs? 😛 |
That's true @khellang! |
Sonarr and CouchPotato both have options for URL Bases. I'm using a NGINX reverse proxy. When I go to mydomain.com/requests it immediately changes the URL to mydomain.com/userlogin and gives me a 404 page. I'm not 100% sure that a URL Base is what we need to resolve my issues, but it appears it is something this app needs.
The text was updated successfully, but these errors were encountered: