[Tutorial] How to access my site with IP address. — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberHosting

[Tutorial] How to access my site with IP address.

I got this request from someone who wants to access his site via IP address instead of domain.

By default , in this example , I will use local host file to map domain "centos.local" to my internal IP "10.211.55.9"

https://i.imgur.com/LCkZTv4.jpg

so by design , when access by domain , it goes to websites

https://i.imgur.com/lhWUEiK.jpg

and when access by IP , it goes to 404


so here is how to enable it to be accessible by IP address.


1. set up webadmin console

https://forums.cyberpanel.net/discussion/87/tutorial-how-to-setup-and-login-to-openlitespeed-webadmin-console#latest


2. go to Listener page , set both Default and SSL listener , add IP into domain map.

https://i.imgur.com/SBvi3B4.jpg

so before edit , there was only "centos.local" , so we add "10.211.55.9" , separated with <code>,</code>

save and restart OLS

3. now try again with IP , now it loads same page as domain

https://i.imgur.com/AWjlz9z.jpg



NOTE:

it's been said , the important things must be repeated thrice.


Let's Encrypt and many other SSL cert vendors do NOT issue cert for IP address , so you may not be able to get valid HTTPS connection with IP address.

Let's Encrypt and many other SSL cert vendors do NOT issue cert for IP address , so you may not be able to get valid HTTPS connection with IP address.

Let's Encrypt and many other SSL cert vendors do NOT issue cert for IP address , so you may not be able to get valid HTTPS connection with IP address.

Comments

  • edited December 2019
    Excellent information; alternatively there are free domain names (.tk .ml .ga .cf .gq) available along with anycast DNS at Freenom.com which will get you a SSL cert.
  • Hi qtwerk, thanks for your tutorial. Unfortunately it doesn't work. I did add the IP into the default and SSL listener. IP address still giving me 404.

    Please help. Thanks.
  • Type your comment> @jaac said:
    > Hi qtwerk, thanks for your tutorial. Unfortunately it doesn't work. I did add the IP into the default and SSL listener. IP address still giving me 404.
    >
    > Please help. Thanks.

    OLS or LSWS?
  • Type your comment> @qtwrk said:
    > Type your comment> @jaac said:
    > > Hi qtwerk, thanks for your tutorial. Unfortunately it doesn't work. I did add the IP into the default and SSL listener. IP address still giving me 404.
    > >
    > > Please help. Thanks.
    >
    > OLS or LSWS?

    I'm using OLS 1.6.12
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!