配置如下:
<VirtualHost *:80> DocumentRoot /var/www/html/wordpress ServerName golanger.cn </VirtualHost> <VirtualHost *:80> DocumentRoot "/root/source/chat" ServerName chat.golanger.cn ProxyRequests On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://42.121.99.166:8081/ ProxyPassReverse / http://42.121.99.166:8081/ </VirtualHost>
其中 golanger.cn 为wordpress站点
chat.golanger.cn 为Go的Web聊天室
环境变量
export GOROOT=~/otp/go export GOOS=linux export GOARCH=amd64 export GOBIN=$GOROOT/bin export PATH=$GOBIN:$PATH export GOPATH=~/source/chat:$PATH export PATH=$PATH:$GOPATH/bin
有疑问加站长微信联系(非本文作者)