1.添加監聽端口html
sudo vim /etc/apache2/ports.confweb
Listen 80
Listen 6080
<IfModule ssl_module>
Listen 443
</IfModule>apache
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
vim
2.添加虛擬主機配置app
sudo vim /etc/apache2/sites-available/gisas.confide
<VirtualHost *:6080>rest
#ServerName www.example.comhtm
ServerAdmin webmaster@localhost
DocumentRoot /var/www/htmlip
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>ssl
#Rewrite
RewriteEngine On
ErrorLog ${APACHE_LOG_DIR}/error-gisas.log
CustomLog ${APACHE_LOG_DIR}/access-gisas.log combined
WSGIDaemonProcess gisas user=my group=my threads=5
WSGIScriptAlias / /var/www/apps/gisas/gisas.wsgi
<Directory "/var/www/apps/gisas/">
WSGIProcessGroup gisas
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
3.應用虛擬主機配置
sudo a2ensite gisas
4.重啓服務
sudo systemctl restart apache2