2020-09-23 22:14:29 -07:00
<!DOCTYPE html>
< html >
< head >
< meta charset = "utf-8" / >
< meta name = "viewport" content = "user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" / >
2023-07-17 09:59:29 +05:30
< title > Cloudron - Not Found< / title >
< meta name = "description" content = "Cloudron - Not Found" >
2020-09-23 22:14:29 -07:00
<!-- Use static style as we can't include local stylesheets -->
< style >
html {
height : 100 % ;
width : 100 % ;
padding : 0 ;
}
body {
background-color : white ;
padding : 0 ;
margin : 0 ;
height : 100 % ;
width : 100 % ;
text-align : center ;
2024-03-28 17:22:17 +01:00
font-family : "Noto Sans" , Helvetica , Arial , sans-serif ;
2020-09-23 22:14:29 -07:00
font-size : 13 px ;
line-height : 1.846 ;
}
. content {
display : flex ;
width : 100 % ;
height : 100 % ;
flex-direction : column ;
justify-content : center ;
}
a {
color : #2196f3 ;
text-decoration : none ;
background-color : transparent ;
}
a : hover {
color : #0a6ebd ;
text-decoration : underline ;
}
2021-12-13 11:41:45 -08:00
< / style >
2020-09-23 22:14:29 -07:00
2021-12-13 11:41:45 -08:00
< script type = "text/javascript" >
window . addEventListener ( 'load' , ( event ) => {
2024-04-26 21:21:34 +02:00
// https://stackoverflow.com/questions/37437890/check-if-url-has-domain-name-and-not-an-ip
const containsLetter = /[a-zA-z]/ . test ( window . location . hostname ) ; // ignore technicality that IP can contain letters ! http://192.168.0x1.0x1 or http://0xc0.0xa8.1.1
const isIPv6 = location . hostname . startsWith ( '[' ) && location . hostname . endsWith ( ']' ) ;
let message ;
if ( ! containsLetter || isIPv6 ) { // ipv4 or ipv6
message = 'You cannot view Cloudron dashboard by IP address. Instead, navigate to the domain you configured during setup i.e <b>https://my.domain.example</b> .'
+ '<br>If you do not remember your domain, SSH into your server and run <code>cloudron-support --owner-login</code> .'
} else { // hostname
message = 'You are seeing this page because the DNS record of <b>' + window . location . hostname + '</b> is set to this server\'s IP'
2021-12-13 11:44:57 -08:00
+ ' but Cloudron has no app configured for this domain.' ;
2024-04-26 21:21:34 +02:00
}
document . getElementById ( 'message' ) . innerHTML = message ;
2021-12-13 11:41:45 -08:00
} ) ;
< / script >
2020-09-23 22:14:29 -07:00
< / head >
< body >
< div class = "content" >
2021-12-13 11:41:45 -08:00
< p id = "message" > < / p >
2020-09-23 22:14:29 -07:00
< / div >
< / body >
< / html >