View previous topic :: View next topic |
Author |
Message |
JMMotyer -
Joined: 06 Jul 2005 Posts: 70 Location: Burlington (Toronto-ish), Ontario, Canada
|
Posted: Mon Aug 21, 2023 4:02 pm Post subject: Can I acces my websites on X2 using internal IP address? |
|
|
Hello, folks,
I seem to recall that when I first started using Abyss (X1) 18 years ago, that in addition to accessing that site with the domain name (i.e. www.domain-name.com), that I could also access that same website from my internal home network by using its local IP (and/or localhost).
Since then I've been running multiple hosts on X2.
Am I somehow still able to access each of my multiple hosts using the internal IP address of my PC that Abyss is running on, by including something after the IP?
I notice that when I'm in Abyss Console, when I go into one of the hosts to configure it, my browser's address bar shows, for example:
http://192.168.1.101:9999/hosts/host@13/edit
Am I able to access that host's website itself similarly from inside my home network, using http://192.168.1.101 followed by something like host@13 , etc?
The reason for wanting to do it this way (accessing it by IP) is for testing purposes without using a domain name.
Thank you in advance & have yourselves a great day.
Regards,
John |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Horizon -
Joined: 18 Feb 2022 Posts: 60
|
Posted: Tue Aug 22, 2023 2:16 pm Post subject: |
|
|
Hello,
the best way to access your website over your own local IP address is to remap your domain name with the hosts file to your internal IP.
If you connect directly by IP to your website, Abyss Web Server will fail to know which website you want to access (multiple hosts with different hostnames).
Then you can only access the default host in Abyss Web Server.
And because there's no Host HTTP header if you access your website by IP, then any PHP or CGI script will not be able to find what your hostname (domain name) should be for WordPress or CMS scripts, etc.
You already know that your server's IP is 192.168.1.101 so you could write in your hosts file (example):
192.168.1.101 my-domain-name.com
This will be either /etc/hosts (Linux) or C:\Windows\System32\drivers\etc\hosts (Windows).
This way you can also take any domain name you want for testing without purchasing it, and you can also generate your own self-signed SSL certificates directly from Abyss Web Server itself.
Mapping your internal IP to a domain name is better than direct IP access because it will fully emulate what really happens when people will visit your production (not debug) website and when your php, etc scripts will run. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|