我是新来的多库和nginx服务器,我正在尝试在本地设置服务器Linux Ubuntu 20.04出于测试目的而不是使用诸如赫茨纳(云)或 DigitalOcean(已包含多库图像这是比我需要的旧版本的 Dokku),这可能会导致不必要的财务费用。
更准确地说,我正在尝试在我的/etc/hosts
文件中设置域地址,例如(更新这与dokku.me
域):
127.0.0.1 localhost
188.x.xx.xxx domain.com
10.0.0.2 dokku.me
通过遵循这个Dokku 设置教程并向其传递以下命令之一:
$ dokku domains:set-global localhost
$ dokku domains:set-global domain.com
但是一旦我执行以下命令(为了显示创建的djangotutorial
应用程序):
$ dokku config:show djangotutorial
...我得到这个作为输出:
=====> djangotutorial env vars
NO_VHOST: 1
从那里我在提到的教程中正常执行所有内容,直到执行以下命令(推送到远程服务器):
$ git push dokku main
...我收到以下消息:
ssh: connect to host domain.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
更新#1
输出host domain.com
:
domain.com has address 188.x.xx.xxx
domain.com mail is handled by 10 mx.domain.com.
输出ping -c 10 domain.com
:
PING domain.com (188.x.xx.xxx) 56(84) bytes of data.
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=1 ttl=63 time=17.4 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=2 ttl=63 time=9.22 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=3 ttl=63 time=1.88 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=4 ttl=63 time=4.12 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=5 ttl=63 time=1.87 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=6 ttl=63 time=1.43 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=7 ttl=63 time=2.77 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=8 ttl=63 time=3.60 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=9 ttl=63 time=2.06 ms
64 bytes from domain.com (188.x.xx.xxx): icmp_seq=10 ttl=63 time=3.95 ms
命令输出traceroute domain.com
:
traceroute to domain.com (188.x.xx.xxx), 30 hops max, 60 byte packets
1 router.lan (192.168.ab.x) 7.239 ms 7.141 ms 7.148 ms
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 * * *
输出ip addr
命令:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 4c:ed:fb:95:d2:90 brd ff:ff:ff:ff:ff:ff
3: wlx048d3814ce5c: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 04:8d:38:14:ce:5c brd ff:ff:ff:ff:ff:ff
inet 192.168.ab.xyz/24 brd 192.168.ab.qyy scope global dynamic noprefixroute wlx048d3814ce5c
valid_lft 4694sec preferred_lft 4694sec
inet6 fe80::888c:74c6:b7d7:2de0/64 scope link noprefixroute
valid_lft forever preferred_lft forever
4: br-cac2c9a0fe00: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:23:36:d3:17 brd ff:ff:ff:ff:ff:ff
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-cac2c9a0fe00
valid_lft forever preferred_lft forever
inet6 fe80::42:23ff:fe36:d317/64 scope link
valid_lft forever preferred_lft forever
5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:f3:02:02:63 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:f3ff:fe02:263/64 scope link
valid_lft forever preferred_lft forever
7: veth374c258@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-cac2c9a0fe00 state UP group default
link/ether 46:ca:a7:33:95:0f brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::44ca:a7ff:fe33:950f/64 scope link
valid_lft forever preferred_lft forever
9: veth264cbc8@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
link/ether 66:1d:5e:0e:05:96 brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::641d:5eff:fe0e:596/64 scope link
valid_lft forever preferred_lft forever
11: vethad55888@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-cac2c9a0fe00 state UP group default
link/ether 9e:80:5a:9c:a0:33 brd ff:ff:ff:ff:ff:ff link-netnsid 2
inet6 fe80::9c80:5aff:fe9c:a033/64 scope link
valid_lft forever preferred_lft forever
13: veth1584b7e@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-cac2c9a0fe00 state UP group default
link/ether c2:53:b9:e6:02:3d brd ff:ff:ff:ff:ff:ff link-netnsid 3
inet6 fe80::c053:b9ff:fee6:23d/64 scope link
valid_lft forever preferred_lft forever
14: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
15: vboxnet1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:01 brd ff:ff:ff:ff:ff:ff
16: vboxnet2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:02 brd ff:ff:ff:ff:ff:ff
17: vboxnet3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:03 brd ff:ff:ff:ff:ff:ff
18: vboxnet4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 0a:00:27:00:00:04 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.1/24 brd 10.0.0.255 scope global vboxnet4
valid_lft forever preferred_lft forever
inet6 fe80::800:27ff:fe00:4/64 scope link
valid_lft forever preferred_lft forever
dsfsdf
命令输出route
:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default router.lan 0.0.0.0 UG 600 0 0 wlx048d3814ce5c
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 vboxnet4
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 wlx048d3814ce5c
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-cac2c9a0fe00
192.168.ab.t 0.0.0.0 255.255.255.0 U 600 0 0 wlx048d3814ce5c
笔记:我对某些 IP 地址使用了别名,例如188.x.xx.xxx
、192.168.ab.t
等。
===============更新#1::结束=============
有没有办法通过提到的信息来实现这一目标以及如何实现?
非常感谢任何建议/帮助。先感谢您。