Can't get SWS with systemd on ArchLinux #227
-
Hi! I have found https://github.com/static-web-server/static-web-server/tree/master/systemd Error log:
I have not ideas why it's failing? When it started with systemd witch folder it use as
In case of direct run it seems that it want
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I don't know what is your setup but what you can do for testing is use CLI options instead For example something like: ExecStart=/usr/local/bin/static-web-server --fd 0 --config-file /some/optional/file --root /some/root/dir/ Also, check please the docs for testing the service with the socket activation. |
Beta Was this translation helpful? Give feedback.
-
@joseluisq Yes, with this string all works. What does it mean? It did not find dir for serving from config?
|
Beta Was this translation helpful? Give feedback.
-
Perfect thanks! The issue was because: |
Beta Was this translation helpful? Give feedback.
First, what you are doing instead of binding SWS to a particular port, you are binding to a file descriptor (
--fd 0
). This is great when you want to sandbox programs like SWS viasystemd
for example.All of this is called socket activation and you can read more about it in the docs.
Regarding the error. It was about SWS complaining about the default root
public
dir not being available because most probably when you used the environmentetc_default_static-web-server
file, it was not found bysystemd
when starting your SWS service, and therefore the environment variables were not loaded. That's why SWS was using the defaults like rootpublic
dir, etc.What I can recommend is that if you wa…