u
This commit is contained in:
parent
de6baa9d64
commit
071a1a8a82
@ -13,7 +13,7 @@ fi
|
||||
|
||||
echo "=== Installing basic tools"
|
||||
apt update
|
||||
apt install -y emacs git curl screen sudo automake rsync
|
||||
apt install -y emacs git wget curl screen sudo automake rsync dnsutils gcc g++ make python
|
||||
echo
|
||||
|
||||
echo "=== Making dir /faronear/"
|
||||
|
@ -37,6 +37,15 @@ then
|
||||
git config --global credential.helper $CredentialHelper
|
||||
fi
|
||||
|
||||
echo "---------------------------------------------"
|
||||
echo "Store pull rebase to true or false? (leave blank for no change)"
|
||||
read -p ">>> " PullRebase
|
||||
if [ $PullRebase ]
|
||||
then
|
||||
echo "git config --global pull.rebase $PullRebase"
|
||||
git config --global pull.rebase $PullRebase
|
||||
fi
|
||||
|
||||
echo "---------------------------------------------"
|
||||
echo "Path to global gitignore file? (For example ~/.gitignore, leave blank for no change)"
|
||||
read -p ">>> " ExcludesFile
|
||||
|
@ -39,8 +39,10 @@ set NIXHOME1=%FONPATH%\fon\sysconfig\nixhome
|
||||
set NIXHOME2=%FONPATH%\fon.git\sysconfig\nixhome
|
||||
set NIXHOME3=%FONPATH%\fon\sysconfig.git\nixhome
|
||||
set NIXHOME4=%FONPATH%\fon.git\sysconfig.git\nixhome
|
||||
set NIXHOME5=%CD%\nixhome
|
||||
echo *** Testing Path [%NIXHOME1%] [%NIXHOME2%] [%NIXHOME3%] [%NIXHOME4%] [%NIXHOME5%]
|
||||
set NIXHOME5=%FONPATH%\sysconfig.git\nixhome
|
||||
set NIXHOME6=%FONPATH%\sysconfig\nixhome
|
||||
set NIXHOME7=%CD%\nixhome
|
||||
echo *** Testing Path [%NIXHOME1%] [%NIXHOME2%] [%NIXHOME3%] [%NIXHOME4%] [%NIXHOME5%] [%NIXHOME6%] [%NIXHOME7%]
|
||||
if exist "%NIXHOME1%" (
|
||||
set NIXHOME=%NIXHOME1%
|
||||
) else if exist "%NIXHOME2%" (
|
||||
@ -51,6 +53,10 @@ if exist "%NIXHOME1%" (
|
||||
set NIXHOME=%NIXHOME4%
|
||||
) else if exist "%NIXHOME5%" (
|
||||
set NIXHOME=%NIXHOME5%
|
||||
) else if exist "%NIXHOME6%" (
|
||||
set NIXHOME=%NIXHOME6%
|
||||
) else if exist "%NIXHOME7%" (
|
||||
set NIXHOME=%NIXHOME7%
|
||||
) else (
|
||||
echo ××× none of the testing path is valid.
|
||||
echo;
|
||||
|
@ -1,40 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name pan.farinear.cn;
|
||||
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
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_set_header X-Forwarded-Host $server_name;
|
||||
proxy_read_timeout 1200s;
|
||||
|
||||
# used for view/edit office file via Office Online Server
|
||||
client_max_body_size 0;
|
||||
|
||||
access_log /var/log/nginx/seahub.access.log;
|
||||
error_log /var/log/nginx/seahub.error.log;
|
||||
}
|
||||
|
||||
location /seafhttp {
|
||||
rewrite ^/seafhttp(.*)$ $1 break;
|
||||
proxy_pass http://127.0.0.1:8082;
|
||||
client_max_body_size 0;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_connect_timeout 36000s;
|
||||
proxy_read_timeout 36000s;
|
||||
proxy_send_timeout 36000s;
|
||||
|
||||
send_timeout 36000s;
|
||||
|
||||
proxy_request_buffering off;
|
||||
}
|
||||
|
||||
location /media {
|
||||
root /faronear/bin.seafile/sea/seahub;
|
||||
}
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name pan.farinear.cn;
|
||||
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
|
||||
server_tokens off; # Enables or disables emitting nginx version on error pages and in the "Server" response header field.
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
ssl_certificate /etc/letsencrypt/live/pan.farinear.cn/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/pan.farinear.cn/privkey.pem;
|
||||
server_name pan.farinear.cn;
|
||||
|
||||
server_tokens off;
|
||||
|
||||
ssl_session_timeout 5m;
|
||||
ssl_session_cache shared:SSL:5m;
|
||||
# secure settings (A+ at SSL Labs ssltest at time of writing)
|
||||
# see https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS;
|
||||
ssl_prefer_server_ciphers on;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
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_set_header X-Forwarded-Host $server_name;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
|
||||
proxy_read_timeout 1200s;
|
||||
|
||||
# used for view/edit office file via Office Online Server
|
||||
client_max_body_size 0;
|
||||
|
||||
access_log /var/log/nginx/seahub.access.log;
|
||||
error_log /var/log/nginx/seahub.error.log;
|
||||
}
|
||||
|
||||
location /seafhttp {
|
||||
rewrite ^/seafhttp(.*)$ $1 break;
|
||||
proxy_pass http://127.0.0.1:8082;
|
||||
client_max_body_size 0;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_connect_timeout 36000s;
|
||||
proxy_read_timeout 36000s;
|
||||
proxy_send_timeout 36000s;
|
||||
|
||||
send_timeout 36000s;
|
||||
|
||||
proxy_request_buffering off;
|
||||
}
|
||||
|
||||
location /media {
|
||||
root /faronear/bin.seafile/sea/seahub;
|
||||
}
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
curl https://get.acme.sh | sh -s email=ssl@faronear.org
|
||||
## 或者:
|
||||
# git clone https://github.com/acmesh-official/acme.sh.git
|
||||
# cd ./acme.sh
|
||||
# ./acme.sh --install -m my@example.com
|
||||
|
||||
pushd /faronear/fon/sysconfig
|
||||
pushd /faronear/sysconfig
|
||||
# 取消被默认添加到 .bashrc 的设置
|
||||
git reset . && git checkout .
|
||||
# echo '. "$HOME/.acme.sh/acme.sh.env"' >> ~/.bashrc_custom ## already integrated in .bashrc
|
||||
|
Loading…
Reference in New Issue
Block a user