A simple HTTP server that runs as a plugin, allowing you to run a website off your server!
With this plugin, you can run a simple HTTP server off your Unturned Server. You can also manage/check the status of the http server in-game.
Permission Node | Related Permission |
---|---|
httpserver | Base Permission Node to run /HttpServer |
httpserver.start | Allows the user to Start the HTTP server |
httpserver.stop | Allows the user to Stop the HTTP Server |
httpserver.status | Allows the user to check the status of the HTTP Server |
/HTTPServer is the command you use to control the HTTP Server in-game. With it, you can Start, Stop, and Check the status of the HTTP Server.
/HTTPServer Start
/HTTPServer Start (Port)
/HTTPServer Stop
/HTTPServer Status
Settings Key | Relevant Setting |
---|---|
HTTPServerAddress | The Prefix for the HTTP Server (See below) |
AutostartHTTPServer | Specifies if the HTTP Server should start when the Unturned Server Starts |
AllowHTTPControls | Specifies if the HTTP Server Start/Stop Commands are enabled. |
VerboseOutput | Enables/Disables Verbose Output (Verbose output can get spamy on large servers) |
HTTPServerDirectory | The Directory (folder) that contains the files/folders to host, Defaults to the 'Server" folder inside of the Plugin's config folder |
RootServerFile | Specifies the root file (e.g., the file you get when going to www.domain.com), set it do %auto for auto-detect |
The server prefix specifies how the server runs. It must end in a forward slash, specify the method (http or https), the scope, and the port.
Most people will just use https. But you can use https, but you need an SSL certificate to be installed on the host computer.
The 3 most common scopes are Local, Specific, and All.
Scope | Key | Info | Example |
---|---|---|---|
All | * | Allows the server to be connected to from any domain | http://*:80/ |
Specific | (Server IP or Domain) | Allows the server to be only connected to via the key | http://domain.com:80/ |
Local | Localhost | Only allows the server to be connected to via localhost (The host pc) | http://localhost:80/ |
Most People will just want to use the default, All (*).
This HTTP server can run off the main port of your Unturned Server. Since the ports for your server (Your base port, though to your base port + 2) are commonly TCP/UDP, this plugin can utilise the TCP connection for your server to run a http server. This also means you can use this plugin even if you’re not using a dedicated server.
Note: I have not Thoroughly tested this for issues, but basic tests have shown no issue with running the http server on the same port as your base server itself. (I believe the base port uses UDP to query the server, so TCP is left open for the HTTP server)
For hosting the server on an alternate port, you will need to open that port and port-forward it.
Port forward the TCP port the HTTP server is running off
See this Article for info on how to do this on Windows.