Last active
May 3, 2020 06:58
-
-
Save jmpews/d8dc8773c972ab821f0c285acd775b46 to your computer and use it in GitHub Desktop.
unknown server configuation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initial | |
sudo apt update & sudo apt upgrade & sudo apt install git cmake zsh | |
# initialize user | |
useradd -s /bin/bash -d /home/accel -m accel | |
usermod -s /usr/bin/zsh | |
# docker | |
https://docs.docker.com/engine/install/ubuntu/ | |
# gogs | |
docker container run -d --name gogs \ | |
--restart always \ | |
-p 10022:22 \ | |
-p 10080:3000 \ | |
-v /data/docker/gogs:/data \ | |
gogs/gogs:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker run -d -p 80:80 --name nginx nginx:latest | |
docker cp nginx:/etc/nginx/nginx.conf /docker/nginx | |
docker cp nginx:/etc/nginx/conf.d /docker/nginx | |
server | |
{ | |
listen 80; | |
server_name git.libkernel.com; | |
client_max_body_size 50m; | |
location / { | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://138.68.13.241:10080; | |
} | |
access_log /var/log/nginx/git.libkernel.log; | |
} | |
docker container run -d --name nginx \ | |
--restart always \ | |
-p 80:80 \ | |
-v /data/docker/nginx/nginx.conf:/etc/nginx/nginx.conf \ | |
-v /data/docker/nginx/conf.d:/etc/nginx/conf.d \ | |
-v /data/nginx/logs:/var/log/nginx \ | |
nginx:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment