File Template

Systemctl

/etc/systemd/system/XXXXX.service

[Unit]
Description=XXXXX

[Service]
Type=simple
User=root
WorkingDirectory=/
ExecStart=[shell]
Restart=on-failure

[Install]
WantedBy=multi-user.target

systemctl daemon-reload

Apache2

a2enmod ssl
a2enmod rewrite
a2enmod proxy proxy_balancer proxy_http
systemctl restart apache2

/etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80
#Listen 8080
<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

/etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:443>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        ServerName jbnrz.com.cn
        #启用 SSL 功能
        SSLEngine on
        #证书文件的路径
        SSLCertificateFile /etc/httpd/ssl/jbnrz.com.cn.crt
        #私钥文件的路径
        SSLCertificateKeyFile /etc/httpd/ssl/jbnrz.com.cn.key
        #证书链文件的路径
        SSLCertificateChainFile /etc/httpd/ssl/root_bundle.crt

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        <Directory "/var/www/html">
        # 新增
        RewriteEngine on
        RewriteCond %{SERVER_PORT} !^443$
        RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
        </Directory>

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>
<VirtualHost *:443>

        ServerName cloud.jbnrz.com.cn
        #启用 SSL 功能
        SSLEngine on
        #证书文件的路径
        SSLCertificateFile /etc/httpd/ssl/cloud/cloud.jbnrz.com.cn.crt
        #私钥文件的路径
        SSLCertificateKeyFile /etc/httpd/ssl/cloud/cloud.jbnrz.com.cn.key
        #证书链文件的路径
        SSLCertificateChainFile /etc/httpd/ssl/cloud/root_bundle.crt
        #这里填代理服务器的IP或域名
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride all
                Order deny,allow
                Allow from all
                # 新增
                RewriteEngine on
                RewriteCond %{SERVER_PORT} !^443$
                RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
        </Directory>
        AllowEncodedSlashes NoDecode
        ProxyPass / http://127.0.0.1:5212/ nocanon
        ProxyPassReverse / http://127.0.0.1:5212/

        # RewriteEngine on
        # RewriteCond   %{HTTPS} !=on
        # RewriteRule   ^(.*)  https://%{SERVER_NAME}$1 [L,R]

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

pip.ini

[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn

apt

Ubuntu 20.04
/etc/apt/sources.list

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

Clash

/home/username/.config/clash/

config.yaml 从 windows 导出

Country.mmdb 从 https://github.com/esrrhs/pingtunnel/blob/master/GeoLite2-Country.mmdb 下载

Ubuntu vmware tools Install

换源

apt --purge remove open-vm-tools-desktop 
apt --purge remove open-vm-tools

apt install open-vm-tools-desktop

frpc/frps

frpc.ini

[common]
tls_enable = true
server_addr = ip
server_port = 7000
token = token

[test web]
type = tcp
local_ip = 127.0.0.1 
local_port = 80 
remote_port = 80

frps.ini

[common]
bind_port = 7000
dashboard_addr = 0.0.0.0
dashboard_port = 1234
dashboard_user = user
dashboard_pwd = pwd
enable_prometheus = true
pprof_enable = true
token = token

Ping

关闭:echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
开启:echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇