[英]Proxy Reverse - Apache
我无法进行连接。
在我的服务器上,我的AngularJS项目的所有代码都在以下位置:
/var/www/html/web/site
我的apache2配置文件位于:
/etc/httpd/conf
(我还有其他项目正常工作)
我使用的虚拟主机如下:
<VirtualHost *:80>
ProxyPreserveHost On
ServerName webtest.stover.int
ServerAlias webtest.stover.int
RedirectMatch ^/$ /web/site
</VirtualHost>
如果我听错了,我是说,当输入webtest.stover.int时,我重定向到
/var/www/html/web/site/index.html
它正确执行但给我一个权限错误:
You do not have permission to access /web/site/index.html on this server.
非常感谢!
使用以下步骤:
1)更新虚拟文件:
<VirtualHost *:80>
ServerAdmin admin@test.com
ServerName mysite.com
ServerAlias www.mysite.com
ProxyRequests Off Order deny,allow Allow from all
<Location />
ProxyPass http:// mysite.com:8000/
ProxyPassReverse http:// mysite.com:8000/
</Location>
</VirtualHost>
2)启用必要的Apache模块
要启用这四个模块,请连续执行以下命令。
sudo a2enmod代理
须藤a2enmod proxy_http
须藤a2enmod proxy_balancer
须藤a2enmod lbmethod_byrequests
3)要使这些更改生效,请重新启动Apache。
sudo systemctl重新启动apache2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.