mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Warning when server hostname is not pointing to server IP
This commit is contained in:
parent
92229c2597
commit
c923cabc19
1 changed files with 6 additions and 0 deletions
|
@ -1507,6 +1507,12 @@ fi
|
|||
# Comparing hostname and ip
|
||||
make_ssl=0
|
||||
host_ip=$(host $servername | head -n 1 | awk '{print $NF}')
|
||||
if [ "$host_ip" != "$ip" ]; then
|
||||
echo "***** PROBLEM: Hostname $servername is not pointing to your server (IP address $ip)"
|
||||
echo "Without pointing your hostname to your IP, LetsEncrypt SSL will not be generated for your server hostname."
|
||||
read -p "Try to point your hostname $servername to IP address $ip and then press ENTER."
|
||||
host_ip=$(host $servername | head -n 1 | awk '{print $NF}')
|
||||
fi
|
||||
if [ "$host_ip" = "$ip" ]; then
|
||||
ip="$servername"
|
||||
make_ssl=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue