安装apache2
略
配置
在/etc/apache2创建文件httpd.conf,内容如下:
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
<VirtualHost *:80>
ServerName testops.top
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
在apache2.conf添加以下内容:
Include httpd.conf
ServerName 127.0.0.1
重启apache2:
sudo systemctl restart apache2