1
0
forked from x/ContextOS
This commit is contained in:
IT 老营长 @云轩领航-创始人 2022-09-08 13:35:30 +08:00
parent dd9ae90de2
commit 3f6313759e
7 changed files with 26 additions and 36 deletions

View File

@ -1,4 +1,3 @@
proxy_set_header X-HOST $scheme://$http_host/; proxy_set_header X-HOST $scheme://$http_host/;
proxy_set_header X-Real-Port $remote_port; proxy_set_header X-Real-Port $remote_port;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;

View File

@ -13,18 +13,17 @@ client_body_temp_path /tmp/nginx/client_body_temp;
location / { location / {
include header.conf; include header.conf;
proxy_pass http://127.0.0.1:9020; proxy_pass http://contexts;
} }
location /space/ { location /space/ {
include header.conf; include header.conf;
proxy_pass http://127.0.0.1:9020; proxy_pass http://contexts;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
} }
location /x/ { location /x/ {
include header.conf; include header.conf;
proxy_pass http://127.0.0.1:9030; proxy_pass http://contexts_repos;
} }

View File

@ -9,52 +9,43 @@ http {
proxy_buffering off; proxy_buffering off;
keepalive_timeout 1800; keepalive_timeout 1800;
server { log_format access '[$time_local] $remote_addr'
listen 80; ' "$request" "$http_referer" "$http_user_agent"'
server_name shylinux.com; ' $server_name $status $body_bytes_sent';
access_log logs/access.log access;
location / { upstream contexts {
include header.conf; server 127.0.0.1:9020;
if ($http_user_agent ~* "^Wget") { }
proxy_pass http://127.0.0.1:9020; upstream contexts_repos {
break; server 127.0.0.1:9030;
}
return 302 https://shylinux.com/;
}
} }
server {
listen 80;
server_name shylinux.com;
include locations.conf;
}
server { server {
listen 443 ssl; listen 443 ssl;
server_name shylinux.com; server_name shylinux.com;
include location.conf;
ssl_certificate_key 8293704_shylinux.com.key; ssl_certificate_key 8293704_shylinux.com.key;
ssl_certificate 8293704_shylinux.com.pem; ssl_certificate 8293704_shylinux.com.pem;
include location.conf;
} }
server { server {
listen 80; listen 80;
server_name contexts.com.cn; server_name contexts.com.cn;
include locations.conf;
location / {
include header.conf;
if ($http_user_agent ~* "^Wget") {
proxy_pass http://127.0.0.1:9020;
break;
}
return 302 https://contexts.com.cn/;
}
} }
server { server {
listen 443 ssl; listen 443 ssl;
server_name contexts.com.cn; server_name contexts.com.cn;
include location.conf;
ssl_certificate_key 7424713_contexts.com.cn.key; ssl_certificate_key 7424713_contexts.com.cn.key;
ssl_certificate 7424713_contexts.com.cn.pem; ssl_certificate 7424713_contexts.com.cn.pem;
include location.conf;
} }
} }

View File

@ -1,3 +1,6 @@
~web.code.nginx
server module name demo
~cli ~cli
daemon import daemon import

View File

@ -1,7 +1,3 @@
usr/install/busybox-1.33.0/_install/usr/sbin
usr/install/busybox-1.33.0/_install/usr/bin
usr/install/busybox-1.33.0/_install/sbin
usr/install/busybox-1.33.0/_install/bin
usr/install/ffmpeg-4.2.1/_install/bin usr/install/ffmpeg-4.2.1/_install/bin
usr/install/qemu-3.1.0/_install/bin usr/install/qemu-3.1.0/_install/bin
usr/install/gcc-4.8.4/_install/bin usr/install/gcc-4.8.4/_install/bin

View File

@ -23,6 +23,7 @@ import (
_ "shylinux.com/x/golang-story/src/tcmalloc" _ "shylinux.com/x/golang-story/src/tcmalloc"
_ "shylinux.com/x/golang-story/src/docker" _ "shylinux.com/x/golang-story/src/docker"
_ "shylinux.com/x/golang-story/src/gotags"
_ "shylinux.com/x/golang-story/src/grafana" _ "shylinux.com/x/golang-story/src/grafana"
_ "shylinux.com/x/golang-story/src/kubernetes" _ "shylinux.com/x/golang-story/src/kubernetes"
_ "shylinux.com/x/golang-story/src/prometheus" _ "shylinux.com/x/golang-story/src/prometheus"
@ -35,6 +36,7 @@ import (
_ "shylinux.com/x/linux-story/src/glibc" _ "shylinux.com/x/linux-story/src/glibc"
_ "shylinux.com/x/linux-story/src/kernel" _ "shylinux.com/x/linux-story/src/kernel"
_ "shylinux.com/x/linux-story/src/qemu" _ "shylinux.com/x/linux-story/src/qemu"
_ "shylinux.com/x/linux-story/src/sysctl"
_ "shylinux.com/x/mysql-story/src/client" _ "shylinux.com/x/mysql-story/src/client"
_ "shylinux.com/x/mysql-story/src/server" _ "shylinux.com/x/mysql-story/src/server"

View File

@ -10,7 +10,7 @@ label `
code wiki chat team mall code wiki chat team mall
linux nginx context redis mysql linux nginx context redis mysql
bash git golang vim tmux bash git golang vim tmux
` ` fg blue bg yellow
chapter "理论" chapter "理论"
label ` label `