Skip to content

st41a/netease

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nginx Web Panel

A web-based GUI panel for managing Nginx web server configurations, built with Python and Flask.

Features

  • 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

Prerequisites

  • Python 3.7 or higher
  • Nginx web server installed
  • Appropriate permissions to read/write Nginx configuration directories

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/nginx-web-panel.git
cd nginx-web-panel
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install the dependencies:
pip install -r requirements.txt
  1. 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

Running the Application

  1. Start the web panel:
python app.py
  1. Access the web interface at http://localhost:5000

For Production Use

For production deployment, it's recommended to use a WSGI server like Gunicorn:

  1. Install Gunicorn:
pip install gunicorn
  1. Run with Gunicorn:
gunicorn -w 4 -b 0.0.0.0:5000 app:app
  1. Configure a reverse proxy (Nginx itself) to serve the application.

Security Considerations

  • 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

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors