Simple web-form for system administrators or support engineers. Sends form data via email and writes one to the DB Sqlite.
- Python3.6 or beyond installed
- Nginx installed
- Git installed (optional)
- Download the repository to your webroot directory e.g. /var/www
cd /var/www
git clone https://github.com/Dionis-90/admin-web-form.git
- Copy and rename files
- db.db.structure db.sqlite (or other name)
- form.conf.default to form.conf (or other name)
- settings_example.py to settings.py
- Open your settings.py and check email settings and paths.
- Create Nginx virtual host config e.g.:
server {
listen 80;
server_name form.example.com ;
root /var/www/admin-web-form/;
index index.html;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_read_timeout 60;
proxy_connect_timeout 5;
proxy_set_header Host $host:$server_port;
proxy_set_header Referer $http_referer;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
and restart Nginx
nginx -t && service nginx reload
-
Install requirements:
pip3 install cherrypy
-
Run application e.g.:
python3 form.py &