XMAPP配置

F:\xmapp\apache\conf\extra

httpd-vhosts.conf

XMAPP配置XMAPP配置
peizhi##<VirtualHost *:80>
## DocumentRoot "F:/xmapp/htdocs/API/"
## ServerName localhost
##</VirtualHost>
##<VirtualHost *:80>
## DocumentRoot "F:/xmapp/htdocs/zcool/"
## ServerName localhost
##</VirtualHost>
<VirtualHost *:80>
DocumentRoot "F:/xmapp/htdocs/"
ServerName localhost
</VirtualHost>

那么关键是如何解决呢,其实很简单,只要在静态资源服务器上,增加一个头信息: Access-Control-Allow-Origin * 首先编辑httpd.conf 找到这行 #LoadModule headers_module modules/mod_headers.so 把#注释符去掉 LoadModule headers_module modules/mod_headers.so 目的是开启apache头信息自定义模块 AllowOverride none Require all denied Header set Access-Control-Allow-Origin * 百度apache跨域设置

上一篇:ASP.NET MVC ModelValidator小结


下一篇:Gradle 简记