-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Feature request: modify server root directory #430
Comments
Hello @batzkass , |
I realize that my configuration is a bit "fancy" : the frontend apache acts as a proxy, and unpacks the incoming query address then removes the But that's not a viable option for remi. At a first glance it doesn't seems difficult to me to adapt resource paths, can you please provide me some information on the main difficulties it could raise ? My understanding of the resource paths you made is the following: we want the webserver to have multiple resource dirs, unlike classical webservers that directly link the dirs tree to the client queries. To overcome that, you wrote a syntax with the |
Your understanding of dirs is correct. It is required also to fix this regex https://github.com/dddomodossola/remi/blob/35b74690acf12adb2bf6a3f13c05695393451db6/remi/server.py#L646 . That regex is important to validate the path. |
Ok so I'll have a try and keep you informed. |
I started to work on it and I feel like it will work. I have one question however: the variable containing |
Also, could you please tell me what is the purpose of this decorator on |
I can't find an elegant way to transfer that variable query_root to gui.py. I will tell you if I will get an idea.
you can do also:
So you cannot fix it, the user should do manually :
I think it is not so elegant that the user passes query_root to Image and Video constructors. It should be done internally. Otherwise the user code loses maintainability. Consider if a user should change that value all around its code. I have not a better idea, it's just a consideration. |
My aim is to modify the decorator to handle this, so that it is transparent to the user. At this time I have a minimal working example, that's great. |
Don't you think that |
It could work. Maybe the query_root name can be changed into url_root? Do you think could be better? |
Haha, I knew |
I forked remi and my implementation is here : https://github.com/batzkass/remi/tree/url_root |
In readme.md, the last "todo" line about style.css will be problematic. We should talk about that. |
Fixed, see readme. |
@batzkass I am unable to test/improve it in a short time. I'm involved in different projects. However I merged it in a separate branch as is. Thank you a lot for your effort and contribution. |
Sure I understand. I solved everything I think, so it should work nicely. Two items are still opened (see readme):
|
Hi Davide, |
Dear @batzkass , In this period I'm focused to some payd project, and on the C++ porting of remi. Furthermore I'm doing some researches about FPGA programming. I'm really busy. I merged your changes in a separate branch. I cannot test it actually and can't promise you to merge to master branch in a near future. Kind Regards |
Nice projects ! I don't really need it in a short time, as I have setup my servers to download remi from my fork. It's rather that I can't afford to maintain my fork/branch regarding other modifications you may do to remi in parallel. So I just want to avoid this task to be forgotten, and reach a point that merging becomes very complicated. |
Hello, I am interested by this feature, which branch of Remi should I take ? |
Hi,
|
@batzkass : thanks! |
Hi Davide,
I hope you're going well.
I'm facing a technical issue these days with remi, due to one of its limitation. Today I worked this around with subclasses and method replacement in remi, but I think this could be implemented as its a generic feature.
Here it is: I need to tell remi that the "website" root isn't at
xx.xx.xx.xx:XXXX/
, but rather atxx.xx.xx.xx:XXXX/my_defined_root_string
. The solution in remi is basically to concatenate thismy_defined_root_string
variable before all the hard links that are sent to the client. I know remi is far from being a CMS, but I can do a parallel with wordpress, which has a variable that stores this full server address to be able to rightly write all hard links.Without this functionality, its not possible to use it in a serious server environment with multiple users and multiple remi instances. I explain : in a server, you must enter by the standard http or https port, and this must be shared for all remi instances, plus maybe other web services. So what I did is to install apache listening on port
80
from the internet, and multiple instances of remi for multiple apps/users listening on high-levels ports (8000
,8001
, etc...) fromlocalhost
. Imagine my server has a DNS namemyserver.com
. Apache plays the role of a proxy server: with a couple of rules, it takes the input queries onmyserver.com:80/my_defined_root_string_numberX
and regarding the address suffix (my_defined_root_string_numberX
), redirects it to the right instance of remi onlocalhost:800X
. This works great, even the websocket works, but I needed to tweak remi a bit to make it work: tweak all the "hard" links sent to the client with/my_defined_root_string_number1/
.It works well for me, but I think it would be helpful for remi to include this option.
Regards,
Francois
The text was updated successfully, but these errors were encountered: