|
发表于 2019-10-3 08:03:03
|
显示全部楼层
80必须运行,只能新增端口
etc/apache2/ports.conf
etc/apache2/sites-enabled/unetlab.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ServerName eve-ng-com.example.com
<IfModule mod_rewrite.c>
# Logging disabled by default
# LogLevel mod_rewrite.c:trace2
</IfModule>
<Directory /opt/unetlab/html/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /opt/unetlab/data/Exports/>
Options FollowSymLinks Indexes
AllowOverride All
Require all granted
</Directory>
<Directory /opt/unetlab/data/Logs/>
Options FollowSymLinks Indexes
AllowOverride All
Require all granted
</Directory>
<VirtualHost *:80>
ServerAdmin webmaster@unl01.example.com
DocumentRoot /opt/unetlab/html
ErrorLog /opt/unetlab/data/Logs/error.txt
CustomLog /opt/unetlab/data/Logs/access.txt combined
Alias /Exports /opt/unetlab/data/Exports
Alias /Logs /opt/unetlab/data/Logs
<Location /html5/>
Order allow,deny
Allow from all
ProxyPass http://127.0.0.1:8080/guacamole/ flushpackets=on
ProxyPassReverse http://127.0.0.1:8080/guacamole/
</Location>
<Location /html5/websocket-tunnel>
Order allow,deny
Allow from all
ProxyPass ws://127.0.0.1:8080/guacamole/websocket-tunnel
ProxyPassReverse ws://127.0.0.1:8080/guacamole/websocket-tunnel
</Location>
</VirtualHost>
<VirtualHost *:8000>
ServerAdmin webmaster@unl01.example.com
DocumentRoot /opt/unetlab/html
ErrorLog /opt/unetlab/data/Logs/error.txt
CustomLog /opt/unetlab/data/Logs/access.txt combined
Alias /Exports /opt/unetlab/data/Exports
Alias /Logs /opt/unetlab/data/Logs
<Location /html5/>
Order allow,deny
Allow from all
ProxyPass http://127.0.0.1:8080/guacamole/ flushpackets=on
ProxyPassReverse http://127.0.0.1:8080/guacamole/
</Location>
<Location /html5/websocket-tunnel>
Order allow,deny
Allow from all
ProxyPass ws://127.0.0.1:8080/guacamole/websocket-tunnel
ProxyPassReverse ws://127.0.0.1:8080/guacamole/websocket-tunnel
</Location>
</VirtualHost>
另外,如需要更改证书可以参考以下
nano /etc/apache2/sites-enabled/eveng-ssl.conf
change:
SSLCertificateFile /etc/letsencrypt/live/eve-pro.alora.lv/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/eve-pro.alora.lv/privkey.pem
to
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
Restart apache2
systemctl stop apache2
systemctl start apache2
|
|