EVE-NG推广
查看: 4888|回复: 6

EVE-NG修改Web默认端口号

2

主题

3

回帖

154

积分

初级会员

Rank: 2

积分
154
不要修改原来80端口,只需要新增端口就行,以下可以忽略,请看二楼


修改web默认端口号:
具体把80 修改成 你想要的端口号,如:3211
1、修改/etc/apache2/port.conf
2、修改/etc/apache2/sites-available/000-default.conf
3、修改/etc/apache2/sites-available/unetlab.conf
4、/etc/init.d/apache2 restart

回复

使用道具 举报

335

主题

828

回帖

464万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4640178

推广达人宣传达人突出贡献优秀版主论坛元老

QQ
发表于 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

不忘初心
回复

使用道具 举报

0

主题

14

回帖

172

积分

初级会员

Rank: 2

积分
172
发表于 2019-12-23 18:23:54 | 显示全部楼层
感谢分享,学习了
回复

使用道具 举报

0

主题

16

回帖

269

积分

初级会员

Rank: 2

积分
269
发表于 2020-1-23 10:18:15 | 显示全部楼层
谢谢,记录了
回复

使用道具 举报

15

主题

226

回帖

9万

积分

富可敌国

积分
94065
发表于 2020-5-1 10:55:47 | 显示全部楼层
厉害!学习了
回复

使用道具 举报

0

主题

15

回帖

317

积分

初级会员

Rank: 2

积分
317
发表于 2021-10-9 17:17:10 | 显示全部楼层
感谢分享
学习了
回复

使用道具 举报

0

主题

11

回帖

298

积分

初级会员

Rank: 2

积分
298
发表于 2022-6-1 16:38:07 | 显示全部楼层
ports.conf文件里面也需要改么,我在unetlab.conf文件里面增加了还是不行
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


Copyright   ©2015-2022  EmulatedLab  Powered by Discuz!©   ( 浙ICP备2021010423号-1 )
快速回复 返回列表 返回顶部