Want to subscribe to topics you're interested in?
Become a Member

Sysadmin What's the recommended way to test Centminmod locally?

Discussion in 'System Administration' started by pamamolf, Apr 17, 2018.

  1. pamamolf

    pamamolf Well-Known Member

    3,119
    295
    83
    May 31, 2014
    Ratings:
    +531
    Local Time:
    4:16 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hello

    I was thinking to have Centminmod localy on a Centos 7.x (minimal or full ISO) to do some tests..... :)

    What i want to ask is how i should handle the domain creation on that case?

    Should i use an edit to hosts file and point a not existing domain to 127.0.0.1 ?

    Any ideas?

    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    37,235
    8,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,524
    Local Time:
    12:16 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    For me Virtualbox + local hosts file edits
    On the local Virtualbox guest server it's as easy as centmin.sh menu option 2, 22 or nv command creation of Nginx vhost and then editing /etc/hosts

    i.e. with nv command
    Code (Text):
    vhostname=yourdomain.com
    nv -d $vhostname -s y -u "$(pwgen -1cnys 31)"
    echo "$(curl -4s ipinfo.io/ip) $vhostname" >> /etc/hosts
    

    That will create nginx vhost with self-signed ssl + setup /etc/hosts with public local IP mapped to the vhostname domain name

    On your local computing running Virtualbox, edit it's local hosts file. 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
     
    • Like Like x 1
..