forked from omariscoming/ReverseProxy_v2ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
30 lines (20 loc) · 754 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
sudo apt install nginx certbot python3-certbot-nginx -y
read -p "Enter Your Domain: " DOMAIN
mkdomain(){
cp /etc/nginx/sites-available/default /etc/nginx/sites-available/$DOMAIN
}
mkdomain
echo "copying..."
lndomain(){
ln -s /etc/nginx/sites-available/$DOMAIN /etc/nginx/sites-enabled/
}
lndomain
echo "ln the $DOMAIN ..."
echo "edit the file..."
sed -i "s/_;/$DOMAIN;/" "/etc/nginx/sites-available/$DOMAIN"
sed -i "s/ default_server//" "/etc/nginx/sites-available/$DOMAIN"
sed -i "21 r /root/ReverseProxy_x-ui/reverse.txt" "/etc/nginx/sites-available/$DOMAIN"
certbot --nginx -d $DOMAIN --register-unsafely-without-email
systemctl restart nginx
apt install curl
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)