Skip to content

Instantly share code, notes, and snippets.

@andmax
Created April 27, 2020 14:06
Show Gist options
  • Save andmax/c8077d9dac19bb3fa65055930c5fc88e to your computer and use it in GitHub Desktop.
Save andmax/c8077d9dac19bb3fa65055930c5fc88e to your computer and use it in GitHub Desktop.
Ubuntu systemd service for HTTP server
On /etc/systemd/system/httpserver.service:
[Unit]
Description = Http server
Documentation=man:SimpleHTTPServer(1)
After = network.target
[Service]
Type=simple
WorkingDirectory=/home/deepstation/www
ExecStart=/usr/bin/python -m SimpleHTTPServer 9188 &
[Install]
WantedBy = multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment