host.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. # 本配置文件会根据部署位置的不同而修改,此处请自行修改
  3. $local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
  4. # 本地可用这个
  5. $host = 'http://'.$local . Dever::$global['base']['path'];
  6. # 定义assets的域名
  7. $assets = DEVER_APP_HOST . 'assets/';
  8. if(DEVER_APP_NAME == 'manage')
  9. {
  10. $assets = $host . 'web/package/manage/assets/';
  11. }
  12. # 跨域设置
  13. header('Access-Control-Allow-Origin:*');
  14. return array
  15. (
  16. # 项目跟域名
  17. 'base' => DEVER_APP_HOST,
  18. # 跟域名
  19. 'workspace' => $host,
  20. # cookie 域名
  21. 'cookie' => '',
  22. # assets 核心库访问地址 一般用不到,如果想把所有资源都放到这里,就要启用
  23. 'core' => $host . 'assets/lib/',
  24. # assets网络路径
  25. 'assets' => $assets,
  26. 'css' => $assets . 'css/',
  27. 'js' => $assets . 'js/',
  28. 'lib' => $assets . 'lib/',
  29. 'img' => $assets . 'img/',
  30. 'images' => $assets . 'images/',
  31. 'font' => $assets . 'fonts/',
  32. 'public' => $assets . 'public/',
  33. # 后台管理系统的assets路径
  34. 'manage' => $host . 'web/package/manage/assets/default/',
  35. # 合并之后的网络路径,填写之后自动合并资源,不填写则不合并,适合把资源放到云端
  36. //'merge' => $host . 'web/data/assets/' . DEVER_PROJECT . '/',
  37. # 上传系统的上传路径的域名(不带action)
  38. 'upload'=> $host . 'web/package/upload/?save',
  39. # 上传系统的访问域名
  40. 'image' => $host . 'web/data/upload/',
  41. # 是否启用代理功能
  42. 'proxy' => $host . 'web/application/plant/main/?data.proxy?',
  43. # 内部接口定义,manage为当前使用的系统
  44. 'manage_api' => array
  45. (
  46. //'module' => 'http://192.168.33.10/workspace/web/application/earth/module/?',
  47. ),
  48. 'api_server' => array
  49. (
  50. 'worker_num' => 4,
  51. // 'daemonize' => false,
  52. 'pconnect' => 1,
  53. 'open_tcp_keepalive' => true,
  54. 'heartbeat_check_interval' => 300,
  55. 'heartbeat_idle_time' => 600,
  56. ),
  57. );