Installing SFM in a directory URL under a hostname
See original GitHub issueI am trying to install Social Feed Manager (thank you for creating and maintaing it) for research purposes at our institution.
I am not successful at installing SFM under Apache so that it can be accessed in a path in the URL, for instance https://research-server/sfm. The frontpage redirects to https://research-server/sfm/ui and loads fine. All subsequent requests however, drop the sfm in the URL, leading to non-existant pages such as https://research-server/accounts/login.
If I manipulate the request URL in the DOM to send it to https://researh-server/sfm/accounts/login instead, it works fine and I land on the expected page.
What is the way to install SFM in a URL directory path? I would assume a setting next to SFM_HOSTNAME
and SFM_PORT
in the .env file.
My current Apache conf file for this service is simply
<Location /sfm/>
ProxyPass http://localhost:8080/
ProxyPassReverse http://localhost:8080/
</Location>
Is this #1048?
Thank you.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Thanks for the detail you provided in this ticket, @xmacex. I’m closing the ticket, but will re-open if this crops up for anyone else.
Changed
/opt/sfm-setup/invoke.sh
line 10 setting for the API base URLto be
After some error messages and studying the documentation of
urlparse.urljoin
plus this StackOverflow item, I added the following lines of code to/usr/local/lib/python3.6/site-packages/sfmutils/api_client.py
at the very beginning ofApiClient._get
definition on the twitterstreamexporter container as lines 26 and 27:What this does is forces the API url calls to be relative rather than absolute paths, in the case of this particular exporter. Now the export of a Twitter filter query works and I just downloaded a CSV 💪
Absolutely a botch job and these hacks won’t even persist across restarts of the Docker Compose cluster setup – I honestly have no idea how to deal with Docker ¯\(ツ)/¯