update docs
This commit is contained in:
parent
810ab906c4
commit
bf5fa6469d
4 changed files with 63 additions and 25 deletions
|
@ -45,13 +45,14 @@ server {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
setup db backend:
|
### setup db backend:
|
||||||
1. apt-get install postgresql postgresql-contrib libpq-dev
|
1. apt-get install postgresql postgresql-contrib libpq-dev
|
||||||
2. sudo -i -u postgres psql
|
2. sudo -i -u postgres psql
|
||||||
3. create user proxadmin with password 'mypassword';
|
3. create user proxadmin with password 'mypassword';
|
||||||
4. create database proxadmin owner proxadmin encoding 'utf-8';
|
4. create database proxadmin owner proxadmin encoding 'utf-8';
|
||||||
|
|
||||||
setup panel
|
### setup panel:
|
||||||
|
|
||||||
1. adduser USER
|
1. adduser USER
|
||||||
2. cd /home/USER
|
2. cd /home/USER
|
||||||
3. virtualenv -p python3 appserver
|
3. virtualenv -p python3 appserver
|
||||||
|
@ -62,8 +63,8 @@ setup panel
|
||||||
8. cd proxmaster-panel/ ; pip install -r requirements.txt
|
8. cd proxmaster-panel/ ; pip install -r requirements.txt
|
||||||
9. python3 manage.py db init ; python3 manage.py db migrate -m "init" ; python3 manage.py db upgrade ; python3 manage.py deploy
|
9. python3 manage.py db init ; python3 manage.py db migrate -m "init" ; python3 manage.py db upgrade ; python3 manage.py deploy
|
||||||
|
|
||||||
start:
|
### autostart:
|
||||||
|
|
||||||
1. crontab -e
|
1. crontab -e
|
||||||
2. @reboot /usr/bin/screen -dmS proxadmin /home/proxadmin/appserver/proxmaster-panel/start.sh
|
2. @reboot /usr/bin/screen -dmS proxadmin /home/proxadmin/appserver/proxmaster-panel/start.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,42 @@
|
||||||
<IfModule mod_ssl.c>
|
<IfModule mod_ssl.c>
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
|
LogLevel info
|
||||||
ServerAdmin support@example.com
|
ServerAdmin support@example.com
|
||||||
ServerName www.example.com
|
ServerName www.example.com
|
||||||
ServerAlias example.com
|
ServerAlias example.com
|
||||||
|
|
||||||
WSGIDaemonProcess proxadmin user=proxadmin group=proxadmin threads=5
|
RewriteEngine On
|
||||||
WSGIScriptAlias / /home/proxadmin/appserver/proxmaster-panel/start.wsgi
|
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
|
||||||
|
RewriteRule ^ https://www.example.com%{REQUEST_URI} [R=301,L]
|
||||||
|
|
||||||
<Directory "/home/proxadmin/appserver/proxmaster-panel">
|
WSGIDaemonProcess proxadmin user=proxadmin group=proxadmin threads=5 home=/home/proxadmin/appserver/proxadmin/
|
||||||
|
WSGIScriptAlias / /home/proxadmin/appserver/proxadmin/start.wsgi
|
||||||
|
|
||||||
|
<Directory "/home/proxadmin/appserver/proxadmin">
|
||||||
<Files "start.wsgi">
|
<Files "start.wsgi">
|
||||||
Require all granted
|
Require all granted
|
||||||
</Files>
|
</Files>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory "/home/proxadmin/appserver/proxmaster-panel/app">
|
<Directory "/home/proxadmin/appserver/proxadmin/app">
|
||||||
WSGIProcessGroup proxadmin
|
WSGIProcessGroup proxadmin
|
||||||
WSGIApplicationGroup %{GLOBAL}
|
WSGIApplicationGroup %{GLOBAL}
|
||||||
WSGIScriptReloading On
|
WSGIScriptReloading On
|
||||||
Require all granted
|
Require all granted
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
Alias /static /home/proxadmin/appserver/proxmaster-panel/app/static
|
<Directory "/home/proxadmin/appserver/proxadmin/log">
|
||||||
<Directory "/home/proxadmin/appserver/proxmaster-panel/app/static">
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
Alias /static /home/proxadmin/appserver/proxadmin/app/static
|
||||||
|
<Directory "/home/proxadmin/appserver/proxadmin/app/static">
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
Alias /novnc /home/proxadmin/appserver/noVNC
|
||||||
|
<Directory "/home/proxadmin/appserver/noVNC">
|
||||||
Require all granted
|
Require all granted
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/www.example.com-error.log
|
ErrorLog ${APACHE_LOG_DIR}/www.example.com-error.log
|
||||||
|
@ -43,3 +53,4 @@
|
||||||
SSLCertificateChainFile /etc/letsencrypt/live/www.example.com/chain.pem
|
SSLCertificateChainFile /etc/letsencrypt/live/www.example.com/chain.pem
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
23
example.com.conf
Normal file
23
example.com.conf
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerAdmin support@example.com
|
||||||
|
ServerName www.example.com
|
||||||
|
ServerAlias example.com
|
||||||
|
Redirect permanent / https://www.example.com/
|
||||||
|
|
||||||
|
DocumentRoot /var/www/www.example.com
|
||||||
|
<Directory /var/www/www.example.com>
|
||||||
|
Options Indexes FollowSymLinks MultiViews
|
||||||
|
AllowOverride all
|
||||||
|
Order allow,deny
|
||||||
|
allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/www.example.com-error.log
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/www.example.com-access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
alembic==0.9.2
|
alembic==0.9.2
|
||||||
|
appdirs==1.4.3
|
||||||
Babel==2.4.0
|
Babel==2.4.0
|
||||||
blinker==1.4
|
blinker==1.4
|
||||||
click==6.7
|
click==6.7
|
||||||
dnspython==1.15.0
|
dnspython==1.15.0
|
||||||
dnspython3==1.15.0
|
dnspython3==1.15.0
|
||||||
dominate==2.3.1
|
dominate==2.3.1
|
||||||
|
facepy==1.0.8
|
||||||
Flask==0.12.2
|
Flask==0.12.2
|
||||||
Flask-Babel==0.11.2
|
Flask-Babel==0.11.2
|
||||||
Flask-Bootstrap==3.3.7.1
|
Flask-Bootstrap==3.3.7.1
|
||||||
Flask-Login==0.4.0
|
Flask-Login==0.4.0
|
||||||
Flask-Mail==0.9.1
|
Flask-Mail==0.9.1
|
||||||
Flask-Migrate==2.0.3
|
Flask-Migrate==2.0.3
|
||||||
|
Flask-Moment==0.5.1
|
||||||
Flask-Script==2.0.5
|
Flask-Script==2.0.5
|
||||||
Flask-SQLAlchemy==2.2
|
Flask-SQLAlchemy==2.2
|
||||||
Flask-WTF==0.14.2
|
Flask-WTF==0.14.2
|
||||||
|
@ -23,6 +26,7 @@ MarkupSafe==1.0
|
||||||
onetimepass==1.0.1
|
onetimepass==1.0.1
|
||||||
pkg-resources==0.0.0
|
pkg-resources==0.0.0
|
||||||
psycopg2==2.7.1
|
psycopg2==2.7.1
|
||||||
|
Pygments==2.2.0
|
||||||
PyQRCode==1.2.1
|
PyQRCode==1.2.1
|
||||||
python-dateutil==2.6.0
|
python-dateutil==2.6.0
|
||||||
python-editor==1.0.3
|
python-editor==1.0.3
|
||||||
|
@ -32,8 +36,7 @@ schedule==0.4.2
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
sortedcontainers==1.5.7
|
sortedcontainers==1.5.7
|
||||||
SQLAlchemy==1.1.10
|
SQLAlchemy==1.1.10
|
||||||
|
traits==4.6.0
|
||||||
visitor==0.1.3
|
visitor==0.1.3
|
||||||
Werkzeug==0.12.2
|
Werkzeug==0.12.2
|
||||||
WTForms==2.1
|
WTForms==2.1
|
||||||
facepy==1.0.8
|
|
||||||
appdirs==1.4.3
|
|
||||||
|
|
Loading…
Reference in a new issue