A web-based GUI panel for managing Nginx web server configurations, built with Python and Flask.
- Create and manage Nginx configuration files
- Generate configurations for different use cases:
- Proxy servers
- Static file serving
- SSL/TLS configurations
- Load balancing
- PHP-FPM and more
- Security validation of configurations
- Enable/disable configurations
- Test and reload Nginx configurations
- Modern, responsive UI
- Python 3.7 or higher
- Nginx web server installed
- Appropriate permissions to read/write Nginx configuration directories
- Clone the repository:
git clone https://github.com/yourusername/nginx-web-panel.git
cd nginx-web-panel- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install the dependencies:
pip install -r requirements.txt- Configure the application:
Edit the app.py file and update the NGINX_CONFIG_DIR setting to point to your Nginx configuration directory:
app.config['NGINX_CONFIG_DIR'] = '/etc/nginx' # Change to your Nginx config path- Start the web panel:
python app.py- Access the web interface at http://localhost:5000
For production deployment, it's recommended to use a WSGI server like Gunicorn:
- Install Gunicorn:
pip install gunicorn- Run with Gunicorn:
gunicorn -w 4 -b 0.0.0.0:5000 app:app- Configure a reverse proxy (Nginx itself) to serve the application.
- The application needs permissions to read and write Nginx configuration files
- On production systems, ensure proper authentication is added
- Restrict access to the panel to authorized users only
- Consider running the app with a dedicated user with limited permissions
This project is licensed under the MIT License - see the LICENSE file for details.