Skip to content

Instantly share code, notes, and snippets.

@twitnic
Forked from Plou/projectName.local.plou
Created April 6, 2017 15:22
Show Gist options
  • Save twitnic/467f46fd6dd6e1e65c4c9b7d3c206fca to your computer and use it in GitHub Desktop.
Save twitnic/467f46fd6dd6e1e65c4c9b7d3c206fca to your computer and use it in GitHub Desktop.
a virtual host example, Access-Control-Allow-Origin set to allow any request from foreign domains
## projectName
<VirtualHost *:80>
ServerName projectName.local.plou
CustomLog "/www/.logs/projectName.local.plou-access_log" combined
ErrorLog "/www/.logs/projectName.local.plou-error_log"
DocumentRoot "/www/projectName/"
Header set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, PUT, GET, DELETE, OPTIONS"
Header always set Access-Control-Allow-Headers "Content-Type"
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment