设置网站允许跨域访问
环境PHP+小皮面板(apache):
1、在httpd.conf,取消注释:LoadModule headers_module modules/mod_headers.so
2、修改需要被访问网站的vhosts.conf:
<Directory "*">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from XX.XX.XX.XX:XX      //设置允许访问的服务器IP和端口
      Require all granted
      DirectoryIndex index.php index.html error/index.html
            
  </Directory>
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号