Let me preface this with the fact it’s my first time setting up anything in a cloud server, and my previous knowledge consists of doing a local WAMP stack and using web hosting solutions.
I’ve set up an Ubuntu LAMP Install fine, and what I can’t get to work is the CORS! I suspect the module headers, because I don’t seem to get any change on my response headers. I’ve enabled the mod:
sudo a2enmod headers
sudo service apache2 restart
I tried the same .htaccess I used before doing the migration, but it didn’t work, thus for testing purposes I’m using only:
Header set Access-Control-Allow-Origin "*"
Then I did a apachectl -t, which gives me Syntax OK. The following is an excerpt of an apachectl -M:
headers_module (shared)
It should be working, but it’s not. What am I doing wrong?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Also see this fantastic post at www.maxcdn.com
https://www.maxcdn.com/one/tutorial/how-to-use-cdn-with-webfonts/
Answering it myself. Typical “argh I dumbly overlooked this small detail”, it was actually a misconfiguration in the <Directory> for this subdomain in particular.
So, if you get oddities where CORS works for the real path but not a virtual host (subdomain in this case), and this subdomain works fine except for this detail make sure to check if you’ve set everything for Apache right at /etc/apache2/sites-available/example.com.conf, exactly as you did before at 000-default.conf.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.