A web-based administration suite for Apache2 and Nginx on Ubuntu systems. This repository contains two independent admin panels: Apache-Webadmin and Nginx-Webadmin, each built as a single static Go binary with an embedded React SPA.
- Apache-Webadmin: Manage Apache virtual hosts, modules, SSL certificates, PHP-FPM pools, firewall rules, health checks, and audit logging.
- Nginx-Webadmin: Manage Nginx virtual hosts, redirects, rewrites, SSL certificates, PHP-FPM pools, firewall rules, reverse proxy upstreams, and audit logging.
Both projects are designed for Ubuntu servers with minimal runtime dependencies and a secure, non-root service model.
- Modern web UI: React SPA with responsive layout
- Admin login: secure credentials with session handling
- Audit trail: track configuration changes and actions
- Let's Encrypt support: integrated Certbot workflows
- Firewall management: UFW rule creation with lockout protection
- Live monitoring: metrics and log tailing
- Health checks: system and configuration validation
- Secure service model: non-root daemon with scoped sudo permissions
- Virtual host management: create, enable, disable Apache sites
- Apache module toggling: uses
a2enmod/a2dismod - PHP-FPM support: manage PHP pools and versions
- Config validation: runs
apache2ctl configtestbefore applying changes
- Virtual host management: create, enable, disable Nginx sites
- Redirects & rewrites: build advanced URL rules
- Access control: per-path IP and method restrictions
- Reverse proxy upstreams: load-balanced backend pools
- File-type blocking: security-focused request filtering
- phpMyAdmin support: configurable
phpmyadminintegration - Dedicated PHP pools: per-site PHP-FPM pool support
- Go version: 1.22
- HTTP router: chi
- Storage: SQLite for users, sessions, and audit logs
- Security: CSRF, secure cookies, rate limiting
- Config: YAML-based configuration files
- Assets: frontend files embedded via Go
embed
- React 19
- TypeScript
- Vite for development and production builds
- Tailwind CSS for styling
- TanStack Query for server state
- React Hook Form with Zod validation
- Drag-and-drop support via
@dnd-kit
- Debian packages for Ubuntu
- Minimal runtime dependencies: web server, certbot, UFW, PHP-FPM where applicable
- Systemd service with restricted sudoers access
- Go 1.22 or later
- Node.js 18+ and npm
- Debian packaging tools (
debhelper,dpkg-dev, etc.) - Ubuntu build environment
cd Apache-Webadmin
# Frontend
cd web
npm ci
npm run build
cd ..
# Backend
GOTOOLCHAIN=local CGO_ENABLED=0 go build \
-tags=osusergo,netgo -ldflags "-s -w" \
-o apache-webadmin ./cmd/apache-webadmin/
# Or use make
make build
make deb # creates ../apache-webadmin_0.1.0_amd64.debcd Nginx-Webadmin
# Frontend
cd web
npm ci
npm run build
cd ..
# Backend
GOTOOLCHAIN=local CGO_ENABLED=0 go build \
-tags=osusergo,netgo -ldflags "-s -w" \
-o nginx-webadmin ./cmd/nginx-webadmin/
# Or use make
make build
make deb # creates ../nginx-webadmin_0.1.0_amd64.debsudo apt install ./apache-webadmin_0.1.0_amd64.deb
sudo apache-webadmin createadmin --username admin --password secret123
sudo systemctl enable --now apache-webadmin
sudo apt install ./nginx-webadmin_0.1.0_amd64.deb
sudo nginx-webadmin createadmin --username admin --password secret123
sudo systemctl enable --now nginx-webadminsudo mkdir -p /etc/apache-webadmin /var/lib/apache-webadmin
sudo mkdir -p /etc/nginx-webadmin /var/lib/nginx-webadmin
sudo cp apache-webadmin /usr/bin/
sudo cp nginx-webadmin /usr/bin/
sudo useradd --system --shell /bin/false apache-webadmin
sudo useradd --system --shell /bin/false nginx-webadmin
sudo chown apache-webadmin:apache-webadmin /var/lib/apache-webadmin
sudo chown nginx-webadmin:nginx-webadmin /var/lib/nginx-webadminlisten: "127.0.0.1:9100"
data_dir: "/var/lib/apache-webadmin"
# Optional TLS for the admin interface
# tls_cert: "/etc/letsencrypt/live/yourdomain.com/fullchain.pem"
# tls_key: "/etc/letsencrypt/live/yourdomain.com/privkey.pem"
apache2_sites_available: "/etc/apache2/sites-available"
apache2_sites_enabled: "/etc/apache2/sites-enabled"
apache2_conf_available: "/etc/apache2/conf-available"
apache2_conf_enabled: "/etc/apache2/conf-enabled"
apache2_log_dir: "/var/log/apache2"
php_dir: "/etc/php"listen: "127.0.0.1:9000"
data_dir: "/var/lib/nginx-webadmin"
# Optional TLS for the admin interface
# tls_cert: "/etc/letsencrypt/live/yourdomain.com/fullchain.pem"
# tls_key: "/etc/letsencrypt/live/yourdomain.com/privkey.pem"
nginx_sites_available: "/etc/nginx/sites-available"
nginx_sites_enabled: "/etc/nginx/sites-enabled"
nginx_conf_d: "/etc/nginx/conf.d"
nginx_snippets: "/etc/nginx/snippets"
nginx_log_dir: "/var/log/nginx"
php_dir: "/etc/php"
pma_path: "/usr/share/phpmyadmin"- Apache-Webadmin: http://127.0.0.1:9100
- Nginx-Webadmin: http://127.0.0.1:9000
Remote access via SSH tunnel:
ssh -L 9100:127.0.0.1:9100 yourserver # Apache
ssh -L 9000:127.0.0.1:9000 yourserver # Nginx- Login with admin credentials
- Review dashboard metrics and recent activity
- Create and manage virtual hosts
- Issue and manage SSL certificates
- Configure firewall rules safely
- Tail live access and error logs
- Audit configuration changes
apache-webadmin version
nginx-webadmin version
sudo apache-webadmin createadmin --username admin --password newpassword
sudo nginx-webadmin createadmin --username admin --password newpassword
sudo apache-webadmin doctor
sudo nginx-webadmin doctor- Services run as non-root users (
apache-webadmin/nginx-webadmin) - Restricted sudo privileges are granted only for required commands
- Configuration changes are validated before being applied
- Failed config changes do not break the live server
- Admin-only UI access is bound to localhost by default
- CSRF protection and secure session handling are enabled
- Only assets and files created by Webadmin are managed automatically
# Clone and setup
cd Apache-Webadmin # or Nginx-Webadmin
# Backend development
go run ./cmd/apache-webadmin/ --config /tmp/config.yaml
# Frontend development (with hot reload)
cd web
npm run dev # Proxies API calls to backend
# Design system gallery (dev only)
# Visit http://127.0.0.1:5173/designApache-Webadmin/
├── cmd/apache-webadmin/ # Main application entry point
├── internal/
│ ├── api/ # HTTP handlers and routing
│ ├── apachecfg/ # Apache configuration generation
│ ├── apachectl/ # Apache control commands
│ ├── apachelog/ # Log parsing and tailing
│ ├── auth/ # Authentication middleware
│ ├── certbot/ # SSL certificate management
│ ├── config/ # Configuration loading
│ ├── dbms/ # Database management
│ ├── doctor/ # Health check system
│ ├── firewall/ # UFW rule management
│ ├── modules/ # Apache module management
│ ├── phpfpm/ # PHP-FPM pool management
│ ├── ssl/ # SSL configuration
│ ├── store/ # Database operations
│ └── web/ # Embedded web assets
├── web/ # React frontend source
├── debian/ # Debian packaging files
└── Makefile # Build automation
Go Dependencies (both projects):
github.com/go-chi/chi/v5: HTTP routergithub.com/gorilla/csrf: CSRF protectiongolang.org/x/crypto: Cryptographic functionsmodernc.org/sqlite: SQLite database drivergopkg.in/yaml.v3: YAML configuration parsing
Node.js Dependencies (frontend):
- React 19 with TypeScript
- Tailwind CSS for styling
- TanStack Query for data fetching
- React Hook Form + Zod for form validation
- Motion for animations
Service won't start:
sudo journalctl -u apache-webadmin -f
sudo journalctl -u nginx-webadmin -fConfiguration validation fails:
sudo apache2ctl configtest
sudo nginx -tPermission issues:
- Check sudoers file:
/etc/sudoers.d/apache-webadmin - Verify service user exists and has correct permissions
Database issues:
- SQLite database location:
/var/lib/apache-webadmin/admin.db - Inspect with:
sudo sqlite3 /var/lib/apache-webadmin/admin.db
Reset admin password:
sudo apache-webadmin createadmin --username admin --password newpassword
sudo nginx-webadmin createadmin --username admin --password newpasswordReinstall package:
sudo dpkg --purge apache-webadmin
sudo apt install ./apache-webadmin_0.1.0_amd64.debThe Webadmin project provides pre-built Debian packages for easy installation. Download the latest versions from the project's release page or use the following commands:
# Set the desired version (update this for new releases)
APACHE_VERSION="0.1.0"
NGINX_VERSION="0.1.0"
# Download Apache-Webadmin package
wget https://github.com/Modracx/Webadmin/releases/download/v${APACHE_VERSION}/apache-webadmin_${APACHE_VERSION}_amd64.deb
# Download Nginx-Webadmin package
wget https://github.com/Modracx/Webadmin/releases/download/v${NGINX_VERSION}/nginx-webadmin_${NGINX_VERSION}_amd64.deb# Install Apache-Webadmin
sudo apt update
sudo apt install ./apache-webadmin_${APACHE_VERSION}_amd64.deb
# Install Nginx-Webadmin
sudo apt install ./nginx-webadmin_${NGINX_VERSION}_amd64.debAfter installation, create the admin user and start the services:
# Create admin user for Apache-Webadmin
sudo apache-webadmin createadmin --username admin --password your_secure_password
# Create admin user for Nginx-Webadmin
sudo nginx-webadmin createadmin --username admin --password your_secure_password
# Enable and start services
sudo systemctl enable apache-webadmin nginx-webadmin
sudo systemctl start apache-webadmin nginx-webadmin
# Verify services are running
sudo systemctl status apache-webadmin
sudo systemctl status nginx-webadmin- Apache-Webadmin: http://127.0.0.1:9100
- Nginx-Webadmin: http://127.0.0.1:9000
For remote access, use SSH port forwarding:
# Apache-Webadmin
ssh -L 9100:127.0.0.1:9100 your-server
# Nginx-Webadmin
ssh -L 9000:127.0.0.1:9000 your-server- Fork the repository
- Create a feature branch
- Make changes with tests
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Current version: 0.1.0
For issues and questions:
- Check the troubleshooting section above
- Review service logs with
journalctl - Run the
doctorcommand for health checks - Examine audit logs for change history /var/www/project/Webadmin/README.md