if you use ubuntu 18.04 or higher version of OS, you can follow these settings.
apt update -y
apt install -y apache2 letsencrypt redis python3-pip mysql-server libapache2-mod-wsgi-py3 libapache2-mod-log-sql-mysql
pip3 install redis flask flask_migrate flask_sqlalchemy Flask-Mail flask_caching flask_socketio flask-recaptcha sqlalchemy sqlalchemy_utils pymysql wakeonlan
> sudo mysql -u root < user.sql
You should add your default account for wake on lan web server. this sql file makes default mysql account on your mysql-server. If you wanna change your account, you have to change account informations on app/config.py
and user.sql
python3 run.py
I recommand the reverse proxy setting. If you use web server like apache2 or nginx, you need to use wsgi( or uwsgi) or gunicorn or something.
...
export WOL_DIR=/var/www/wol/
...
This is apache2 environment value that it helps you to configure your config file(like wol.conf). This value can be written on /etc/apache2/envvar
.
sudo a2enmod rewrite
sudo a2enmod wsgi
sudo a2enmod ssl
You should enable these modules, if you want to init apache2 service.
rewrite : One of apache2 module what makes your request forward to other URL or File.
- RewriteEngine
- RewriteCond
- RewriteRule
- etc.
wsgi : One of apache2 module that it makes you can use 'kind of WSGI configuration' on your apache2 config files. This module can install using apt-get(or apt).
library name :
libapache2-mod-wsgi-py3
.
- WSGIScriptAlias
- WSGIDaemonProcess
- WSGIApplicationGroup
- etc.
ssl : One of apache2 module that it makes you can use SSL configuration in your apache2 config files.
- SSLCertificateFile
- SSLCertificateKeyFile
- SSLCertificateChainFile
- etc.
sudo a2ensite wol
sudo a2dissite 000-default
Your configuration file(wol.conf) should be ensited, and should dissite default config file(000-default.conf)
- GNU General Public License v3.0
- Example : https://wol.example.kkamikoon.com
- Template : https://adminlte.io (MIT)