Nginx Access Control Allow Origin

当静态资源文件和主站域名不一样时,字体文件之类的会爆如下错误: Font from origin 'http://www.typenter.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.kernelstudio.com' is therefore not allowed access. Nginx 解决办法: 将这段代码添加到 或者  中, 域名也可以进行通配 

nginx & wordpress configure rewrite

nginx & wordpress 配置重写来做伪静态,每个域名单独放到一个server文件中,在nginx.conf中包含进去,这样有利于配置管理.
me@localhost /# cat /webserver/nginx/vhost/lastme.conf
1.在需要配置伪静态的server配置文件中,配置如下...

Archives

Categories

Recent Posts

Recent Comments

Tags