Skip to content

Proposal: http/https server and custom domain for everyone! #105

@mayli

Description

@mayli

So, let's improve the nginx on shell server to next level!

Currently shell-server has a basic nginx service is nearly hard to use for new users.

So the plan is:

  • having a global nginx server listening on port 80 and 443

    • use Let's Encrypt to obtain https certificates and auto-renew
  • default etc/skel to provide

    • serve http://<user>.<server>.hashbang.sh from ~user/.nginx.sock
    • systemd --user service and nginx config to start nginx serving Public done
  • optional etc/skel to provide https service

    • serve https://<user>.<server>.hashbang.sh from ~user/.nginx.https.sock
    • systemd --user service and nginx config to start nginx serving Public
  • custom domains

    • forward custom domains to
      • /var/run/nginx/<domain>.http.sock
      • /var/run/nginx/<domain>.https.sock

The global nginx server config looks like this (the ssl part)

stream {    
    server {
        listen      443;
        proxy_protocol on;
        proxy_pass  unix:/var/run/nginx/$ssl_preread_server_name.https.sock;
        ssl_preread on;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions