Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem of Multi-domain name and Cross-domain by Apache

Shulou Source: shulou.com Published: 2022-06-01 11:09:14 11月08日 Update

This article mainly introduces "how to solve the problem of multi-domain name cross-domain by Apache". In the daily operation, I believe many people have doubts about how to solve the problem of multi-domain name cross-domain by Apache. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to solve the problem of multi-domain name cross-domain by Apache". Next, please follow the editor to study!

Developer feedback:

No 'Access-Control-Allow-Origin' header is present on the requested resource

Vi httpd.conf cancels the following comment #

LoadModule headers_module [...] Then add Header set Access-Control-Allow-Origin "*" to the VirtualHost service

# # Global configuration is as follows

Add the following configuration at the bottom of vi httpd.conf:

Header set Access-Control-Allow-Origin: "*"

Header set Access-Control-Allow-Methods: "GET,POST,PUT,DELETE,OPTIONS"

Header set Access-Control-Allow-Headers: "Content-Type"

At this point, the study on "how to solve the problem of multi-domain name cross-domain by Apache" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Questions multiple domain names learning more help configuration practicality next personnel overall situation articles methods comments theory knowledge articles websites materials follow easy to use Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MySQL Xiaomi Linux OPPO Reno