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

Something wrong with static file serving and/or paths, possibly MacOS dependent #1200

Open
jamescheney opened this issue Sep 23, 2024 · 0 comments
Labels

Comments

@jamescheney
Copy link
Contributor

This is on Mac OSx, experienced by a student trying to do a project using Links and replicated by me.

After installing OPAM, OCaml and Links, we can run Links using the linx alias. However, trying to run the non-DB examples using this command line:

linx --path=$OPAM_SWITCH_PREFIX/share/links/examples:$OPAM_SWITCH_PREFIX/share/links/examples/games $OPAM_SWITCH_PREFIX/share/links/examples/webserver/examples-nodb.links

encounters a problem: fetching the CSS file examples/css/doc.css fails with a 404, so the page doesn't display or (for the most part) work properly.

I replicated this in my own Mac OS environment and found through trial and error that the command line DOES work IF run in current working directory from which examples/css/doc.css can be reached as a relative path. I confirmed that that is the file being read, by renaming it temporarily and confirming the 404.

So, it appears in these environments that something relating to the path and webserver static file serving is not working correctly and/or OS dependent (I'll try a clean Linux setup next to see if the same thing happens, but I would be surprised if it does since others would have tripped over it by now). There's an obvious workaround using symbolic links, but it would be nice to make this more portable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant