1
0
forked from x/ContextOS
This commit is contained in:
IT 老营长 @云轩领航-创始人 2022-03-15 20:49:53 +08:00
parent 26ec4cb073
commit 52ec9ec6dd
5 changed files with 78 additions and 54 deletions

24
etc/conf/location.conf Normal file
View File

@ -0,0 +1,24 @@
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 30m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
client_max_body_size 100m;
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";
}

View File

@ -1,57 +1,62 @@
user shy;
worker_processes 1;
events {
worker_connections 1024;
}
events { worker_connections 1024; }
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 1800;
sendfile on;
proxy_buffering off;
keepalive_timeout 1800;
server {
listen 80;
server_name contexts.top;
location / { return 302 https://contexts.top/; }
}
server {
listen 443 ssl;
server_name contexts.top;
ssl_certificate_key contexts.top_nginx/contexts.top.key;
ssl_certificate contexts.top_nginx/contexts.top_bundle.pem;
include location.conf;
}
server {
listen 80;
server_name contexts.com.cn;
location / { return 302 https://contexts.com.cn/; }
}
server {
listen 443 ssl;
server_name contexts.com.cn;
ssl_certificate_key 7424713_contexts.com.cn.key;
ssl_certificate 7424713_contexts.com.cn.pem;
include location.conf;
}
server {
listen 80;
server_name shylinux.com;
location / {
return 302 https://shylinux.com/;
}
location / { return 302 https://shylinux.com/; }
}
server {
listen 443 ssl;
server_name shylinux.com;
ssl_certificate 6157098_shylinux.com.pem;
ssl_certificate_key 6157098_shylinux.com.key;
ssl_certificate 6157098_shylinux.com.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 30m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
client_max_body_size 100m;
location / {
proxy_pass http://127.0.0.1:9020;
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 /space/ {
proxy_pass http://127.0.0.1:9020;
proxy_set_header X-HOST $scheme://$http_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";
}
include location.conf;
}
}

14
go.mod
View File

@ -11,3 +11,17 @@ require (
shylinux.com/x/nginx-story v0.3.7
shylinux.com/x/redis-story v0.3.7
)
replace (
shylinux.com/x/ice => ./usr/release
shylinux.com/x/icebergs => ./usr/icebergs
shylinux.com/x/toolkits => ./usr/toolkits
)
replace (
shylinux.com/x/golang-story => ./usr/golang-story
shylinux.com/x/linux-story => ./usr/linux-story
shylinux.com/x/mysql-story => ./usr/mysql-story
shylinux.com/x/nginx-story => ./usr/nginx-story
shylinux.com/x/redis-story => ./usr/redis-story
)

19
go.sum
View File

@ -2,24 +2,5 @@ shylinux.com/x/go-qrcode v0.0.1 h1:/eOGqMj1qtgs9Ymd12zTUa1gcJZs9S92kj2lb0QzKsE=
shylinux.com/x/go-qrcode v0.0.1/go.mod h1:KAbtU+KwiiABMZ/CJ0zh9PI2AX82Uf9rRYcQ4ODm4po=
shylinux.com/x/go-sql-mysql v0.0.1 h1:VX5SrwLBKzfkRouj39LgJ9reIXOWmMsScRpr+e0qdp0=
shylinux.com/x/go-sql-mysql v0.0.1/go.mod h1:47OfAZK24HRJMy7dAu/jrksGCf9yzJaAUFwWYjhDFDA=
shylinux.com/x/golang-story v0.3.6 h1:3yMPRZK/bW9oaWquhlagJZq8LTLY3sQxrt+rvkSrGO4=
shylinux.com/x/golang-story v0.3.6/go.mod h1:4nkJ5zyhNNC2ulPsf6WowneJ+axCw8eWMpsLwiQrvgg=
shylinux.com/x/ice v0.7.6/go.mod h1:cnR4S2jWpPKuUsmnnul1gZCIZeuFeO17ieHbXmWjwpM=
shylinux.com/x/ice v0.8.4 h1:Zt6bN9Q4b91LXyRqo9AuYT6ndRYUAtdceuKKc7F58pU=
shylinux.com/x/ice v0.8.4/go.mod h1:gi+Mh/c9ThB02/QTigDc+2qgbMB/6zdiPQyzkkCqfik=
shylinux.com/x/icebergs v1.0.3/go.mod h1:1fRX95S0HcbeVk1emgtPugJPaR15xhGo3qNYxqIUgCw=
shylinux.com/x/icebergs v1.1.0 h1:Ohb68J9fKUeMVEuSVq7q946Bx5hSNsrsITUa/RjBJRU=
shylinux.com/x/icebergs v1.1.0/go.mod h1:YFxcBWRZYJzaNuvS2pGnqSXdCrCN+ozvcsoyJsfOECk=
shylinux.com/x/linux-story v0.3.4 h1:1YHGOYac0vvzTNcJCT0bPYdImhuZMfM6JBec/DYzmS4=
shylinux.com/x/linux-story v0.3.4/go.mod h1:Fj+ojz6nFPPzVGdiroS2LwvLTP7QaeVMRlfuGp/VbiE=
shylinux.com/x/mysql-story v0.3.6 h1:uIdHEvNlHTOPfnfhA3zSfdYx+eyTu5Out62mXlOfGCY=
shylinux.com/x/mysql-story v0.3.6/go.mod h1:7m1ZudvleZ1pPFPC1OECFUVJIxQfU9IlHaYNOoTMSjk=
shylinux.com/x/nginx-story v0.3.7 h1:hq91Okx4LbUbUQG0tOyXConRU2HNEpo4eWArhnfZAYE=
shylinux.com/x/nginx-story v0.3.7/go.mod h1:zKJSb4UIhaMr3wH4Jye1Qz3uRmlESbjRNwArqOMF7uk=
shylinux.com/x/redis-story v0.3.7 h1:x+3CVeMIP/Q13baRoGQ+YAXD7tMHAP4NHyB+mTZhjwo=
shylinux.com/x/redis-story v0.3.7/go.mod h1:8ICaFbBznZDsxtYQHsfQ0+oxKGZ0lzlIgnoOYSnq160=
shylinux.com/x/toolkits v0.5.2/go.mod h1:8LbYHe7oxBIqb6s4MSOD+4d28QvPdvkyCVtwB/JW7AA=
shylinux.com/x/toolkits v0.5.3 h1:DuMHEKiPbaoU+0PEw9CtZldaM8bLLaQ6Dx0Qaqfz3SY=
shylinux.com/x/toolkits v0.5.3/go.mod h1:8LbYHe7oxBIqb6s4MSOD+4d28QvPdvkyCVtwB/JW7AA=
shylinux.com/x/websocket v0.0.1 h1:OBc21DxqsGlQ2+Pz76xqLyDNo1LV+PUUqfWi+1PZPDE=
shylinux.com/x/websocket v0.0.1/go.mod h1:AaSpMToOxbMULKQytzczeHPuqb708vK1vrAzCxLo/XE=

View File

@ -1,8 +1,8 @@
title "contexts"
refer `
官网 https://shylinux.com
官网 https://contexts.com.cn
源码 https://shylinux.com/x/contexts
文档 https://shylinux.com/help/tutor.shy
文档 https://contexts.com.cn/help/tutor.shy
`
chapter "实践"