PyHoster: Nginx alternative built To manage multiple website instances.

PyHoster: Nginx alternative built To manage multiple website instances.

Pyhoster is a free Nginx alternative built with Python to manage multiple website instances easily, efficiently and with control.

Features

  • Create and delete website's in a second (simple as create websitename)
  • Start and stop websites easily (simple as stop websitename)
  • Edit the settings and content of a website easily
  • File Transfer Protocal with SSL (FTPS) built in and easily configurable with a user system!
  • Change the index file of a website easily
  • WARDEN, Our basic lockout system allows you to lock out users from a specific webpage (or all webpages) with a password!
  • Optionally running API to control what happens in pyhost externally
  • Auto-Generate self-signed SSL certificates and put them to use easily! (You can also use your own cert by replacing the file it makes)
  • link a website's content to any folder in your system
  • Make your changes, then update the website with a simple command
  • Built-in function to implement a custom "Page not found" page
  • Update messed up your app? No problem! with PyHost you can rollback any changes with our full snapshot system!
  • Run multiple websites at once
  • User friendly design

Install and use

Install python3.12 from the website or your package manager. (Such as MS store) then run these commands in the directory you want to install pyhoster in.

git clone https://github.com/Ames-hub/pyhoster . 
python3.12 -m venv venv

wait for the venv to install (may take a minute)

on windows, use venv\Scripts\activate.bat to activate the virtual environment.
on linux, use source venv/bin/activate to activate the virtual environment.

then run pip install -r requirements.txt to install what is needed.

Then run python3.12 pyhost.py -O to start the program.

Commands

webcreate - Create a new website app.
wsgicreate - Create a new wsgi app. (WIP)
delete - Delete an app.
edit - Edit a website app.
start - Start a website app.
stop - Stop a website app
restart - Stop and then start a website app. Shorthand way of doing stop app_name && start app_name
idle - Go into an IDLE screen to display information while pyhost does its thing in the background!
pyhost - Access the settings of pyhoster.
exit - Exit the program.
domain - Set the domain name/IP Address used by PyHost for the WebGUI and any other features
update - Updates the content of a website app.
outdated (appname) - Check if an app is outdated
rollback - Reverts the content of a website app to the last update, or a specific version.
enter (feature) - Enter the Command Line Interface (CLI) for a feature such as FTP, UserMan or Warden.
ftp - Enter the FTP Command line interface. Change details, create users, etc
userman - Enter the UserMan Command line interface. Change details, create users, etc
userman > sessions - Enter the Session Manager CLI within the Userman CLI.
warden - Enter the Warden Command line interface. Change details, create users, etc
cls - Clear the screen of all text.
ctrl + c (signal 2) - Exit the program and shutdown all web apps.

Technical and Configuration Details

Environment variables

PYHOST_COMMANDS_LISTEN: Boolean (True, False), if true, pyhoster will start an input line. (Default: True) made toggleable for 'edge' cases where you want to use the keybinds for something else.

Default pages

PyHoster has a few default pages that you can use for your website.

  • 404 Page - The index is found but the requested page is not found. (Default: 404.html. User created, default.html is blank)
  • Index not found - The page shown when the index file is not found. (Default: default.html)
  • Index - The index file of the website. Can be custom set. (Default: index.html)

Security configuration

PyHoster has a few optional security features built in.

  • SSL - PyHoster can generate a self-signed SSL certificate for your website or use your own. (Default: True)
  • File directory Listing toggle. - Toggle whether or not to allow directory listing. (Default: False)
  • Security Headers toggler - PyHoster can add security headers to your website. (Default: True)
  • CSP Directives - add CSP directives to your website! (Default: True)
  • Webpage locking - Lock out users from a webpage with a password. (See bottom of technical_notes/warden.md)

License

  • Not listed yet

Resources & Downloads

GitHub - Ames-hub/pyhoster: An nginx alternative built with python to manage multiple website instances.
An nginx alternative built with python to manage multiple website instances. - Ames-hub/pyhoster






Read more




Open-source Apps

9,500+

Medical Apps

500+

Lists

450+

Dev. Resources

900+

/