sudoc=sudo nginx_Compilation_method() { $sudoc chmod 777 -R ./ ./configure --prefix=./ --with-stream --with-http_stub_status_module # nginx 开启 tcp 和 文件浏览模块: --with-stream --with-http_stub_status_module NR=`cat -n ./src/os/unix/ngx_user.c | grep cd.current_salt | awk -F" " '{print $1}'` ; sleep 0.5 $sudoc sed -i "$NR d" ./src/os/unix/ngx_user.c ; sleep 0.5 $sudoc sed -i "s/-Werror/ /g" objs/Makefile ; sleep 0.5 # 先修改 c 文件,再修改make $sudoc mkdir $setdir/logs ; $sudoc chmod 777 $setdir/logs $sudoc make ; sleep 1 # make 会生成 新文件,新文件也需要修改才能编译 $sudoc sed -i "s/-Werror/ /g" objs/Makefile ; sleep 0.5 $sudoc make install nginx_file_list } nginx_file_list() { echo " sudo nano conf/nginx.conf # http 模块外面写 tcp 配置路径: include /www/wwwconf/tcp/*.conf; # http 模块 里面 http{} 写: include /www/wwwconf/http/*.conf; sudo mkdir -p /www/wwwconf/tcp /www/wwwconf/http ; sudo chmod 777 -R /www/wwwconf/* sudo nano /www/wwwconf/http/web.conf # 开启文件浏览器功能 server{ listen 800; #server_name eisc.cn root /datadisk/eisc/download; location / { #root /mnt/software; #我们开始新建的目录 autoindex on; #以列表信息显示目录文件 index index.html index.htm; charset utf-8; } } sudo nano /www/wwwconf/tcp/tcp.conf # tcp 转发 stream { upstream eisc { server 8.219.134.200:1180; } server { listen 1180; proxy_pass eisc; } } " }