文档中假设用户的服务器为linux整个安装流程也适合其它系统的安装。
开发者在git clone代码之后,里面不仅包含代码包文件,还包含初始化所需要的数据库sql文件
server { listen 80; server_name cmdb.bk.com; root /data/htdocs/cc_openSource; #charset koi8-r; #access_log logs/host.access.log main; location / { index index.php index.html index.htm; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break;} } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # # location ~ /.php$ { # proxy_pass http://127.0.0.1; # } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ /.php$ { fastcgi_connect_timeout 300; fastcgi_read_timeout 300; fastcgi_send_timeout 300; fastcgi_buffer_size 128k; fastcgi_buffers 32 32k; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ //.ht { deny all; } }
代码配置
define('BASE_URL', 'http://cmdb.bk.com'); //访问主域名,务必带上http:// define('COMPANY_NAME', '公司名称'); //当前公司名 define('COOKIE_DOMAIN', '.bk.com'); //cookie访问域