学习目标:
window环境下部署可道云
准备:
- nginx
- kodbox包 下载地址
- php7.3+
部署nginx:
1、将程序放在html文件夹下
2、修改配置文件:
keepalive_timeout 16500;
proxy_read_timeout 3600s;
client_header_timeout 3600s;# 请求头超时
client_body_timeout 3600s;
send_timeout 3600s;
server {
listen 8087;
server_name nginx_heat;
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
proxy_read_timeout 30s; # 设置代理读取超时为30秒
fastcgi_read_timeout 30s; # 设置FastCGI读取超时为30秒
}
location / {
index index.html index.htm index.php;
}
}
fastcgi_pass 指向的是php
部署php:
1、文件夹解压
2、将文件php.ini-development更名为php.ini
3、修改php.ini文件
max_execution_time = 3600;
max_input_time = 3600;
post_max_size = 500M;
upload_max_filesize = 500M;
default_socket_timeout = 600
extension_dir = “C:\php\ext”
cgi.fix_pathinfo=1
找到disable_functions =,将后面的shell_exec和exec函数删除;
启用扩展程序:
extension=curl
extension=fileinfo
extension=gd
extension=mbstring
extension=openssl
extension=pdo_mysql
extension=sqlite3
启动:
\php\php-cgi.exe -b 127.0.0.1:9000
根据上面配置,访问网址:localhost:8087
手机端下载app,将站点配置设置为:Ip:8087
(如果没有做外网端口映射,填写内网地址;如果有外网,设为外网访问)
我手机端操作有概率报”服务器中断“之类的错误,将其改为web模式可正常使用。(这错误可能是有配置受限)