I want to access the local http://localhost:8080/xxxx and point to http://xingke.iask.in/xxx so that there is no cross-domain problem.
But when I set up the apache proxy, it was not set correctly. Access still points to the local
apache vohosts
<VirtualHost *:80>
ServerAdmin wx@qq.com
DocumentRoot "D:/Develop/WWW/Online/Hphp/Public"
ServerName xingke.iask.in
ServerAlias xingke.iask.in
#代理
ProxyPass / http://xingke.iask.in/
ProxyPassReverse / http://xingke.iask.in
<proxy http://xingke.iask.in>
AllowOverride None
Order Deny,Allow
Allow from all
</proxy>
ErrorLog "logs/dummy-host2.xingke.iask.in-error.log"
CustomLog "logs/dummy-host2.xingke.iask.in-access.log" common
</VirtualHost>
Local request address: http://xingke.iask.in/home/in...
Then the following error is reported
A 500 error is reported here, and the service cannot be accessed. How should I set it up? ! !
Shouldn’t local requests be localhost? Does Apache's proxy return a 30x jump? If so, the result is still a cross-domain request. If nginx is used to set the proxy, a 30x jump will not be returned.
It is recommended to consider using nginx to set up a proxy. Please refer to:
https://zhuanlan.zhihu.com/p/...
For your reference, the following is a proxy suitable for setting that I developed in dev, based on vue-cli, index.js in the config directory
cors cross-domain, by the way, you need to configure p3p to make IE support cross-domain cookies