You will just need to add ONE line into your apache.conf .
### bash
cat xx-apache.conf
<VirtualHost *:80>
ServerName "aaa.com"
Header set Access-Control-Allow-Origin “*” <------------------ allow cross site script
<Directory "/usr/local/bbb">
SetEnv LD_LIBRARY_PATH "/usr/local/xxx/lib/:$LD_LIBRARY_PATH"
# Allow from all
</Directory>
</VirtualHost>
then restart daemon
$ sudo /etc/init.d/httpd configtest
$ sudo /etc/init.d/httpd restart
when you curl the url, you will see
curl -i "http://host/xxx?aaa/bbb/ccc"
HTTP/1.1 200 OK
Date: Wed, 26 Oct 2011 03:35:29 GMT
Server: Apache/2.2.3 (CentOS)
Access-Control-Allow-Origin: “*” <----------
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
'IT > etc' 카테고리의 다른 글
vi 에디터에서 특정 캐릭터를 가지고 개행을 할 경우 (0) | 2011.11.23 |
---|---|
티스토리에서 syntax hightlight하기 (0) | 2011.11.23 |
how to avoid autorun.inf file getting generated in a folder (0) | 2011.11.23 |
VB스크립트에서 첨부문서를 가지고 이메일 보내기 (0) | 2011.11.23 |
HTML 태그를 없애버리는 템플릿 (0) | 2011.11.23 |