Learn about Centmin Mod LEMP Stack today
Register Now

Nginx Domains Any chance to access the website without domain name?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by redbird, Mar 22, 2018.

  1. redbird

    redbird Member

    63
    9
    8
    Aug 28, 2015
    Web
    Ratings:
    +16
    Local Time:
    9:53 PM
    Hi,

    Quick question.

    Back in the old days (heh heh :) it was possible to access websites in browser in apache without a domain. something like xxx.xxx.xxx/~sitename

    Is similar available in centmin / nginx ?

    If I created a vhost but not yet pointed domain' DNS to it, is it possible to access it in browser and test things?

    Thank you,
    RB


    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: i.e. 1.11.10
    • PHP Version Installed 7.1.15
    • MariaDB MySQL Version Installed: i.e. 10.0.21 or 10.1.21

     
  2. eva2000

    eva2000 Administrator Staff Member

    36,422
    7,994
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,308
    Local Time:
    9:53 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    That was something cpanel/WHM offers. No such thing in Centmin Mod. You can just use modified hosts file edit to preview domains.

    If you want to preview newdomain.com on new centminmod server without updating DNS, on Windows PC edit your windows HOSTS file at c:\Windows\System32\Drivers\etc\hosts (see guide at Modify your hosts file | Knowledge Center | Rackspace Hosting or install Hostman app HostsMan - abelhadigital.com which can manage the file too and allows easy dns flushing when you make changes to the hosts file.

    c:\Windows\System32\Drivers\etc\hosts contents to preview without DNS update
    Code:
    centminmodserver-ip-address newdomain.com
    to disable preview comment it out and flush dns for your system
    Code:
    #centminmodserver-ip-address newdomain.com
    Hostsman app to flush dns and edit the c:\Windows\System32\Drivers\etc\hosts file
     
    • Informative Informative x 1
  3. Meirami

    Meirami Member

    104
    13
    18
    Dec 21, 2017
    Ratings:
    +36
    Local Time:
    2:53 PM
  4. eva2000

    eva2000 Administrator Staff Member

    36,422
    7,994
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,308
    Local Time:
    9:53 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Personally hosts file edit is easiest as it is truly private testing which you can only access the site and no one else and sometimes you want to be using the real domain name just in testing environment.
     
    • Like Like x 1
  5. redbird

    redbird Member

    63
    9
    8
    Aug 28, 2015
    Web
    Ratings:
    +16
    Local Time:
    9:53 PM
    Great tip George. I knew about it but haven't thought about it in this case lol.

    @Meirami different domain won't work if you are moving the same domain to a different VPS and want to test things first before switching DNS to avoid downtime.
     
  6. upgrade81

    upgrade81 Premium Member Premium Member

    136
    6
    18
    Sep 5, 2016
    Italy
    Ratings:
    +8
    Local Time:
    1:53 PM
    1.13.8
    10
    I too would like the possibility.

    Because using the cloning function of the well-known Wpmanage service, in addition to asking for ftp data, the temporary url is also requested, and in this case you can not provide a host file to use.
     
  7. eva2000

    eva2000 Administrator Staff Member

    36,422
    7,994
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,308
    Local Time:
    9:53 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    unfortunately Centmin Mod doesn't support using /~username to preview sites
     
  8. Jon Snow

    Jon Snow Active Member

    377
    60
    28
    Jun 30, 2017
    Ratings:
    +91
    Local Time:
    8:53 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Can't you just use one of those free domain extensions? (if any exists that do not use frames)
     
  9. JJC84

    JJC84 Premium Member Premium Member

    177
    74
    28
    Jan 31, 2018
    Ratings:
    +107
    Local Time:
    6:53 AM
    1.13.9
    10.1
  10. Jon Snow

    Jon Snow Active Member

    377
    60
    28
    Jun 30, 2017
    Ratings:
    +91
    Local Time:
    8:53 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Also, you can create a sub domain and it should work. That's what I use for some of my test servers.
     
..