1 Star 0 Fork 20

xiaoming / AliceSPA

forked from ruojianll / AliceSPA 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
nginx.conf.sample 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
ruojianll 提交于 2016-02-09 18:40 . first
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8081;
server_name localhost;
root K:\proj\web\AliceSPAFramwork\server\public;
index index.php index.html index.htm;
add_header 'Access-Control-Allow-Origin' 'http://localhost:8080' ;
add_header 'Access-Control-Allow-Credentials' 'true' ;
add_header 'Access-Control-Allow-Methods' 'GET,PUT,POST,DELETE,OPTIONS' ;
add_header 'Access-Control-Allow-Headers' 'Content-Type' ;
add_header 'Content-Type' $content_type ;
location / {
if ($request_method = 'OPTIONS' ) {
return 200;
}
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
server {
listen 8080;
server_name localhost;
root K:\proj\web\AliceSPAFramwork\client\public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
location ~ /\.ht {
deny all;
}
}
}
1
https://gitee.com/weisns/AliceSPA.git
git@gitee.com:weisns/AliceSPA.git
weisns
AliceSPA
AliceSPA
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891