[英]Proxy Reverse - Apache
I can not make my connection work. 我无法进行连接。
On my server I have all the code of my project in AngularJS in the following location: 在我的服务器上,我的AngularJS项目的所有代码都在以下位置:
/var/www/html/web/site
My apache2 configuration file is located at: 我的apache2配置文件位于:
/etc/httpd/conf
(I have other projects working correctly) (我还有其他项目正常工作)
The virtualhost I use is the following: 我使用的虚拟主机如下:
<VirtualHost *:80>
ProxyPreserveHost On
ServerName webtest.stover.int
ServerAlias webtest.stover.int
RedirectMatch ^/$ /web/site
</VirtualHost>
If I do not understand wrong, I am saying that, when entering webtest.stover.int I redirect to 如果我听错了,我是说,当输入webtest.stover.int时,我重定向到
/var/www/html/web/site/index.html
Which it does correctly but it gives me a permission error: 它正确执行但给我一个权限错误:
You do not have permission to access /web/site/index.html on this server.
Thank you so much! 非常感谢!
Using the following steps: 使用以下步骤:
1) Update virtual file:- 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) Enabling Necessary Apache Modules 2)启用必要的Apache模块
To enable these four modules, execute the following commands in succession. 要启用这四个模块,请连续执行以下命令。
sudo a2enmod proxy sudo a2enmod代理
sudo a2enmod proxy_http 须藤a2enmod proxy_http
sudo a2enmod proxy_balancer 须藤a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests 须藤a2enmod lbmethod_byrequests
3) To put these changes into effect, restart Apache. 3)要使这些更改生效,请重新启动Apache。
sudo systemctl restart apache2 sudo systemctl重新启动apache2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.