Authored by xuqi

docs change

@@ -51,10 +51,18 @@ conf/vhosts,nginx注册表文件,restart-nginx.bat, start-nginx.bat, start-php5. @@ -51,10 +51,18 @@ conf/vhosts,nginx注册表文件,restart-nginx.bat, start-nginx.bat, start-php5.
51 51
52 修改完成后可以直接点击start-php5.3.29.bat 和 start-nginx.bat启动PHP和NGINX的服务 52 修改完成后可以直接点击start-php5.3.29.bat 和 start-nginx.bat启动PHP和NGINX的服务
53 53
  54 +PS: nginx的vhost配置参考附件
  55 +
54 ### 配置HOSTS 56 ### 配置HOSTS
  57 +
  58 +#### H5
55 127.0.0.1 m.dev.yohobuy.com 59 127.0.0.1 m.dev.yohobuy.com
56 127.0.0.1 static.m.dev.yohobuy.com 60 127.0.0.1 static.m.dev.yohobuy.com
57 61
  62 +#### WEB
  63 +127.0.0.1 web.dev.yohobuy.com
  64 +127.0.0.1 webstatic.dev.yohobuy.com
  65 +
58 ### 最后一步 66 ### 最后一步
59 进入yohobuy/static目录,运行npm install 和 spm install(需要先`spm config set registry http://spm.yoho.cn`将源指定到我们自己的包仓库)安装下依赖, 成功后在当前目录运行`gulp`启动开发环境服务...看看[m.dev.yohobuy.com](m.dev.yohobuy.com)有没有反应? 67 进入yohobuy/static目录,运行npm install 和 spm install(需要先`spm config set registry http://spm.yoho.cn`将源指定到我们自己的包仓库)安装下依赖, 成功后在当前目录运行`gulp`启动开发环境服务...看看[m.dev.yohobuy.com](m.dev.yohobuy.com)有没有反应?
60 68
@@ -64,3 +72,127 @@ Done ? 'congratulations' : '看看是不是缺了什么,不能解决的时候 @@ -64,3 +72,127 @@ Done ? 'congratulations' : '看看是不是缺了什么,不能解决的时候
64 * js代码风格严格控制,所以请按照[代码规范](http://git.dev.yoho.cn/web/learning-documentation/tree/master/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91%E7%9B%B8%E5%85%B3/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83)编码,JS代码采用了pre-commit的hook进行控制,之前需要你安装下[代码检查](http://git.dev.yoho.cn/ued/yoho-fe/tree/master/code-checker)所需要的东西,请了解并执行。 72 * js代码风格严格控制,所以请按照[代码规范](http://git.dev.yoho.cn/web/learning-documentation/tree/master/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91%E7%9B%B8%E5%85%B3/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83)编码,JS代码采用了pre-commit的hook进行控制,之前需要你安装下[代码检查](http://git.dev.yoho.cn/ued/yoho-fe/tree/master/code-checker)所需要的东西,请了解并执行。
65 * GIT使用规范你需要熟读,可以看[git flow](http://git.dev.yoho.cn/web/learning-documentation/wikis/home)[pro git](http://git-scm.com/book/en/v2) 73 * GIT使用规范你需要熟读,可以看[git flow](http://git.dev.yoho.cn/web/learning-documentation/wikis/home)[pro git](http://git-scm.com/book/en/v2)
66 * 其他开发中使用到的东西(handlebars,sass,seajs,spm等)请参考git库web/learing documentation或者自行google 74 * 其他开发中使用到的东西(handlebars,sass,seajs,spm等)请参考git库web/learing documentation或者自行google
  75 +
  76 +## 附:Nginx配置
  77 +
  78 +```
  79 +server
  80 +{
  81 + listen 80;
  82 + server_name m.dev.yohobuy.com *.dev.yohobuy.com;
  83 +
  84 + #access_log /nginx/logs/access_test_yoho_cn.log combined;
  85 + error_log F:/nginx/logs/error_test_yoho_cn.log warn;
  86 +
  87 + root F:/yohobuy/yohobuy/m.yohobuy.com/public;
  88 +
  89 + # https
  90 + #ssl on;
  91 + #ssl_certificate //nginx/data/server.pem;
  92 + #ssl_certificate_key /nginx/data/server.key;
  93 + #ssl_session_timeout 10m;
  94 +
  95 + location / {
  96 + index index-dev.php;
  97 + if (!-f $request_filename){
  98 + rewrite ^/(.+)$ /index-dev.php?$1& last;
  99 + }
  100 + }
  101 +
  102 + location ~ .*\.php?$ {
  103 + fastcgi_pass 127.0.0.1:9000;
  104 + fastcgi_index index-dev.php;
  105 + #fastcgi_param PATH_INFO $fastcgi_script_name;
  106 + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  107 + include fastcgi_params;
  108 + }
  109 +
  110 +}
  111 +
  112 +server
  113 +{
  114 + listen 80;
  115 + server_name static.dev.yohobuy.com;
  116 +
  117 + #access_log /nginx/logs/access_test_yoho_cn.log combined;
  118 + #error_log /nginx/logs/error_test_yoho_cn.log warn;
  119 +
  120 + root F:/yohobuy/static;
  121 +
  122 + # https
  123 + #ssl on;
  124 + #ssl_certificate //nginx/data/server.pem;
  125 + #ssl_certificate_key /nginx/data/server.key;
  126 + #ssl_session_timeout 10m;
  127 +
  128 + location / {
  129 + expires 1h;
  130 + }
  131 +
  132 + location ~* \.(svg|eot|ttf|woff|otf)$ {
  133 + add_header Access-Control-Allow-Origin *;
  134 + expires 30d;
  135 + }
  136 +
  137 +}
  138 +
  139 +server
  140 +{
  141 + listen 80;
  142 + server_name web.dev.yohobuy.com *.dev.yohobuy.com;
  143 +
  144 + #access_log /nginx/logs/access_test_yoho_cn.log combined;
  145 + error_log F:/nginx/logs/error_test_yoho_cn.log warn;
  146 +
  147 + root F:/yohobuy/yohobuy/www.yohobuy.com/public;
  148 +
  149 + # https
  150 + #ssl on;
  151 + #ssl_certificate //nginx/data/server.pem;
  152 + #ssl_certificate_key /nginx/data/server.key;
  153 + #ssl_session_timeout 10m;
  154 +
  155 + location / {
  156 + index index-dev.php;
  157 + if (!-f $request_filename){
  158 + rewrite ^/(.+)$ /index-dev.php?$1& last;
  159 + }
  160 + }
  161 +
  162 + location ~ .*\.php?$ {
  163 + fastcgi_pass 127.0.0.1:9000;
  164 + fastcgi_index index-dev.php;
  165 + #fastcgi_param PATH_INFO $fastcgi_script_name;
  166 + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  167 + include fastcgi_params;
  168 + }
  169 +
  170 +}
  171 +
  172 +server
  173 +{
  174 + listen 80;
  175 + server_name webstatic.dev.yohobuy.com;
  176 +
  177 + #access_log /nginx/logs/access_test_yoho_cn.log combined;
  178 + #error_log /nginx/logs/error_test_yoho_cn.log warn;
  179 +
  180 + root F:/yohobuy/web-static;
  181 +
  182 + # https
  183 + #ssl on;
  184 + #ssl_certificate //nginx/data/server.pem;
  185 + #ssl_certificate_key /nginx/data/server.key;
  186 + #ssl_session_timeout 10m;
  187 +
  188 + location / {
  189 + expires 1h;
  190 + }
  191 +
  192 + location ~* \.(svg|eot|ttf|woff|otf)$ {
  193 + add_header Access-Control-Allow-Origin *;
  194 + expires 30d;
  195 + }
  196 +
  197 +}
  198 +```