修改conf/config.ini.php里
$cloud_root = null;
为你要映射的目录地址,
注意要给你php的执行用户读写执行权限
3 . 修改nginx配置,参考
server {
listen 443 ssl;
server_name cloud.httpsdav.club;
ssl_certificate ssl/phpdav.crt;
ssl_certificate_key ssl/phpdav.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
access_log /home/phpdav/phpdav/logs/nginx/access.log main;
charset utf-8;
sendfile on;
tcp_nodelay on; #关闭Nagle算法,数据包直接发送
client_max_body_size 0; #不限制body大小
client_body_in_file_only clean; # 连接断开后清除储存的临时数据文件
client_body_in_single_buffer on;
location / {
root /home/work/phpdav/interface;
rewrite .* /index.php break;
fastcgi_pass unix:/home/work/phpdav/server/run/php-cgi.sock;
fastcgi_keep_conn on;
fastcgi_limit_rate 0;
fastcgi_request_buffering on;
fastcgi_cache_revalidate on;
fastcgi_pass_request_headers on;
fastcgi_force_ranges on;
fastcgi_connect_timeout 600s;
fastcgi_read_timeout 600s;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_ID $request_id;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param REQUEST_BODY_FILE $request_body_file;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE phpdav-1.0;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
}
}