Last active
May 31, 2024 14:11
-
-
Save Shelob9/1675d7200be06e48782f3137cb4e5fd8 to your computer and use it in GitHub Desktop.
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
# Install nginx | |
apt install nginx | |
# Run at start | |
systemctl enable nginx | |
# Check status | |
systemctl status nginx |
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 ufw allow 80/tcp | |
sudo ufw reload |
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
# Download | |
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb | |
# Install | |
sudo dpkg -i cloudflared-linux-amd64.deb | |
# Confirm | |
cloudflared version | |
# Login | |
cloudflared tunnel login | |
# Create tunnel | |
cloudflared tunnel create josh412 | |
# Edit | |
cd ~/.cloudflared/ | |
nano config.yml | |
# Add route | |
cloudflared tunnel route dns josh412 www | |
# Run | |
cloudflared tunel run josh412 | |
## Press Ctrl + Z, and enter bg to send the Tunnel output to the background. | |
# Get info | |
cloudflared tunnel info mytunnel | |
# Run at startup | |
sudo cloudflared --config /root/.cloudflared/config.yml service install | |
sudo systemctl enable cloudflared | |
# View the Cloudflared service status. | |
sudo systemctl status cloudflared | |
# Each time you make changes to the config.yml file or create new tunnels, restart cloudflared using the following command. | |
sudo systemctl restart cloudflared |
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
systemctl restart nginx && sudo systemctl restart cloudflared |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment