REST API for managing FastHTTP web server configuration using Fiber framework.
- Install dependencies:
go mod tidy- Enable admin API in
fasthttp.json:
{
"adminEnabled": true,
"adminPort": "8080"
}- Start the server - admin API will start automatically on the configured port.
GET /api/v1/health- Check if API is running
GET /api/v1/config- Get current configurationPUT /api/v1/config- Update entire configurationPOST /api/v1/config/reload- Reload configuration from file
GET /api/v1/virtualhosts- List all virtual hostsGET /api/v1/virtualhosts/:serverName- Get specific virtual hostPOST /api/v1/virtualhosts- Create new virtual hostPUT /api/v1/virtualhosts/:serverName- Update virtual hostDELETE /api/v1/virtualhosts/:serverName- Delete virtual host
GET /api/v1/virtualhosts/:serverName/locations- Get all locations for a virtual hostPOST /api/v1/virtualhosts/:serverName/locations- Add location to virtual hostPUT /api/v1/virtualhosts/:serverName/locations/:index- Update locationDELETE /api/v1/virtualhosts/:serverName/locations/:index- Delete location
GET /api/v1/server/status- Get server statusPOST /api/v1/server/reload- Reload server configurationPOST /api/v1/server/restart- Restart server
GET /api/v1/stats- Get server statistics
The React admin panel is located in admin-ui/ directory.
To start the admin panel:
cd admin-ui
npm install
npm run devThe admin panel will be available at http://localhost:3000 and will connect to the API at http://localhost:8080/api/v1 by default.