I'm running Apache Tomcat on Windows Server 2012. All I did was download the zip file, open it on the desktop and i start/stop everything from there.
I'm trying to access some web services running on the server from a javascript program running on my dev machine. My dev machine and the server running apache are not on the same network and i am getting the following error:
XMLHttpRequest cannot load service-call-snipped-for-brevity Response
to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the
requested resource. Origin 'http://localhost:8080' is
therefore not allowed access.
I've read that i have to add:
Header set Access-Control-Allow-Origin "*"
to the httpd.conf file and I create it in the apache install conf dir (remember apache was "installed" by my unzipping the downloaded zip file to my desktop) and if it doesn't exist I can create it.
Excellent!
Except when I do all that and restart Apache Tomcat I still get the same error.
What am I missing?