question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing SFM in a directory URL under a hostname

See original GitHub issue

I 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.

Screenshot 2021-02-02 at 18 33 02

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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
lwrubelcommented, Oct 27, 2021

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.

0reactions
xmacexcommented, Feb 12, 2021

Changed /opt/sfm-setup/invoke.sh line 10 setting for the API base URL

http://api:8080/

to be

http://api:8080/sfm/

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 of ApiClient._get definition on the twitterstreamexporter container as lines 26 and 27:

if url_part.startswith('/'):
    url_part = url_part[1:]

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 ¯\(ツ)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation and configuration — sfm 2.5.0 documentation
The following will describe how to setup an instance of SFM that uses the latest release (and is suitable for a production deployment.) ......
Read more >
Where do I put my custom models? - Steam Community
Call it whatever you want (I call mine Custom), Put the models and materials folder into that folder. Open the SFM SDK and...
Read more >
How to configure SFM, WBEM, SMH, RSP, and SIM all together?
Most the access will be given to read all the information from /var/opt/wbem/repository directory. Creating WBEM Subscription using a non-privileged user. If ...
Read more >
[Installation Guides] Building OpenCV 3.1 SfM sample code in ...
Create an new folder called eigen. Copy all the files under ./eigen-eigen-ce5a455b34c0 to ./ceres-windows-master\eigen . Open ** ceres-2012.sln ** and build ...
Read more >
Samba - ArchWiki
However, it is needed to access Samba servers by hostname (e.g. smb://hostname/ ) ... Install fs2es-indexer AUR, configure the directories you want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found