Welcome to Centmin Mod Community
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 Premium Member Premium Member

    May 31, 2014
    Local Time:
    4:24 AM
    MariaDB 10.1.x

    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 ?

    Any ideas?

    Thank you
  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    12:24 PM
    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):
    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
    centminmodserver-ip-address newdomain.com
    to disable preview comment it out and flush dns for your system
    #centminmodserver-ip-address newdomain.com
    Hostsman app to flush dns and edit the c:\Windows\System32\Drivers\etc\hosts file
    • Like Like x 1