From b9b3b5a7be923a2084ce99a5bf54f6c1fac406a8 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Wed, 16 Mar 2022 14:28:24 +0800 Subject: [PATCH] opt some --- etc/conf/bash_local.sh | 11 ++++++++--- etc/conf/location.conf | 14 ++++++-------- etc/conf/nginx.conf | 2 -- src/main.go | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/etc/conf/bash_local.sh b/etc/conf/bash_local.sh index 52dfb168..d8b2dd4e 100644 --- a/etc/conf/bash_local.sh +++ b/etc/conf/bash_local.sh @@ -18,11 +18,16 @@ return ps aux |grep -v grep |grep ice.bin &>/dev/null && return ps aux |grep -v grep |grep tmux &>/dev/null && return sleep 1 && cd $CTX_ROOT && source etc/miss.sh +return -# /etc/rc.local -su - shy -c 'cd /home/shy/contexts/ && ./bin/ice.bin forever serve' +# shy +su - shy -c "cd /home/shy/contexts/ && ./bin/ice.bin forever serve &" cd /home/shy/contexts/usr/local/daemon/10000 && ./sbin/nginx -p $PWD -# mac login +# dev +su - harveyshao -c "cd /home/harveyshao/contexts/ && ./bin/ice.bin forever serve dev dev &" +cd /home/harveyshao/contexts/usr/local/daemon/10002 && ./sbin/nginx -p $PWD + +# mac cd /Users/harveyshao/contexts/ && ./bin/ice.bin forever serve dev shy & diff --git a/etc/conf/location.conf b/etc/conf/location.conf index fedd1b5d..dfa2ddd8 100644 --- a/etc/conf/location.conf +++ b/etc/conf/location.conf @@ -1,24 +1,22 @@ -ssl_session_cache shared:SSL:1m; ssl_session_timeout 30m; +ssl_session_cache shared:SSL:1m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; client_max_body_size 100m; +proxy_set_header X-HOST $scheme://$http_host; +proxy_set_header X-Real-Port $remote_port; +proxy_set_header X-Real-IP $remote_addr; + location / { proxy_pass http://127.0.0.1:9020; - proxy_set_header X-HOST $scheme://$host; - proxy_set_header X-Real-Port $remote_port; - proxy_set_header X-Real-IP $remote_addr; } location /space/ { proxy_pass http://127.0.0.1:9020; - proxy_set_header X-HOST $scheme://$host; - proxy_set_header X-Real-Port $remote_port; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; + proxy_set_header Upgrade $http_upgrade; } diff --git a/etc/conf/nginx.conf b/etc/conf/nginx.conf index 592a60f2..07fd372c 100644 --- a/etc/conf/nginx.conf +++ b/etc/conf/nginx.conf @@ -1,5 +1,3 @@ -user shy; - worker_processes 1; events { worker_connections 1024; } diff --git a/src/main.go b/src/main.go index 2f8e5ffd..1da55516 100644 --- a/src/main.go +++ b/src/main.go @@ -1,6 +1,8 @@ package main import ( + _ "shylinux.com/x/contexts/src/hi" + "shylinux.com/x/ice" _ "shylinux.com/x/icebergs/misc/alpha" @@ -34,8 +36,6 @@ import ( _ "shylinux.com/x/linux-story/src/busybox" _ "shylinux.com/x/linux-story/src/kernel" _ "shylinux.com/x/linux-story/src/qemu" - - _ "shylinux.com/x/contexts/src/hi" ) func main() { print(ice.Run()) }