在/etc/httpd/conf.d下新建 vi httpd-vhosts.conf
然后贴入如下<VirtualHost *:80>
DocumentRoot “Vue根目录所在位置”
<Directory “Vue根目录所在位置”>
Options FollowSymLinks
AllowOverride None
Require all granted

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
RewriteEngine On
ProxyPreserveHost On
ProxyPass /api/websocket/ ws://127.0.0.1:端口/websocket/
ProxyPass /api http://127.0.0.1:端口 keepalive=On timeout=60
ProxyPassReverse /api http://127.0.0.1:端口

Logo

前往低代码交流专区

更多推荐