How do I set up a simplest "Hello, world!" webpage?
I haven't found it in man hashbang, on the website and in the repo.
cat .config/systemd/user/SimpleHTTPServer@.service`
...
#each user needs to change the port to an unused value above 1024
ExecStart=/usr/bin/python3 -m http.server %I
...
No idea, TBH.
How do I find out which ports are unused?
(the internet suggest a couple of commands, all sudo. I may not sudo, may I?)
WTF is that %I?
Now, thanks to https://github.com/hashbang/shell-server/issues/105#issuecomment-545555557 and ExecStart=/usr/bin/sh -c 'echo "%I" > wtf_I; /usr/bin/python3 -m http.server %I' and cat Public/wtf_I I know it is an argument substitution, and one runs systemctl --user start SimpleHTTPServer@UNUSED_PORT_ABOVE_1024
What is the address of the page:
hashbang.sh/username
hashbang.sh/~username
etc.
A port to each user. Does it mean the page's address becomes:
How do I set up a simplest "Hello, world!" webpage?
I haven't found it in
man hashbang
, on the website and in the repo.No idea, TBH.
How do I find out which ports are unused? (the internet suggest a couple of commands, all sudo. I may not sudo, may I?)
WTF is that
%I
? Now, thanks to https://github.com/hashbang/shell-server/issues/105#issuecomment-545555557 andExecStart=/usr/bin/sh -c 'echo "%I" > wtf_I; /usr/bin/python3 -m http.server %I'
andcat Public/wtf_I
I know it is an argument substitution, and one runssystemctl --user start SimpleHTTPServer@UNUSED_PORT_ABOVE_1024
What is the address of the page:
A port to each user. Does it mean the page's address becomes:
Is there no way to get rid of port in address?
Again, what is the final address of the page?
I tried:
I have tried several port numbers for
SimpleHTTPServer@
and all abovementioned addresses. The page doesn't openSimilarly, what are the steps for
nginx
in place ofhttp.server
?Please: