Set up Self Managed Dedicated Server (Eg – Godaddy)

Today we are documenting the process to set up Self Managed Dedicated Server that our client had purchased from Godaddy.

Advantages of Self Managed dedicated server is – it is cheaper and we have admin control

Disadvantage is – you have to take care of installations and maintenance. Godaddy provides no support.

So we have to setup everything from scratch on this server.

Below are the main steps:

  1. Setup RDP
    • This you can do from inside Godaddy (or your hosting company).
    • Click the set up button and follow along.
    • This will setup the server at your desired location (provided it is available) and you can generate RDP logins.
    • You will get host ip, user and password to connect via RDP
  2. Connect to RDP using the details you got from Step 1.
  3. The machine is bare metal windows server. You now have to enable DNS and IIS.
  4. Enable DNS
    • On Server Manager, click on Manage (on top right) – Add Roles and features. – Server Roles – Enable – DNS Server – Finish.
    • This is enable DNS on the machine.
    • From Tools (on top right), click on DNS. This opens DNS window.
  5. Add DNS Zone
    • Right click on DNS – Connect to DNS Server – This computer – OK
    • Right click on Forward lookup zone -New zone – Primary zone – This server maintains the zone – Enter the domain name (like domainname.com) – Create a new file with this file name (like domainname.com.dns) – Do not allow dynamic updates – finish
  6. Add DNS entries
    • Right click on domain name and add the following:
    • New A record – Name as blank and IP as machine IP
    • New A record – Name as ns1 and IP as machine IP
    • New A record – Name as ns2 and IP as machine IP
    • New CNAME record – Name as www and FQDN as domainname.com.
  7. Modify the SOA and NS
    • Right click on domainname and click properties.
    • Click on SOA – Change primary server name to ns1.domainname.com. and email to youremail@email.com.
    • Click on Name Servers – Remove the machine name and add ns1.domainname.com. and ns2.domainname.com. with Ip as machine IP
  8. Add glue records / Host name to Godaddy.
    • Go to DNS Manager for the intended domain
    • Click on Hostnames
    • Add the custom DNS (ns1.domainname.com and ns2.domainname.com) with the machine IP
  9. Update DNS
    • Now update DNS of domain to ns1.domainname.com and ns2.domainname.com. This may take upto 48 hours for propagation.
    • You may check the propagation on https://dnschecker.org/#A/domainname.com
  10. Setup IIS
    1. On Server Manager, click on Manage (on top right) – Add Roles and features. – Server Roles – Enable – IIS – Finish.
    2. This is enable IIS on the machine.
  11. Add domain to IIS
  12. Install VCRuntime140
    1. Go to https://visualstudio.microsoft.com/downloads/
    2. Now, go to the “All Downloads” section below and click “Other Tools & Frameworks
    3. After clicking “Other Tools and Framework“, download the “Microsoft Visual C++ Redistributable for Visual Studio 2022″
    4. Before that, do not forgot to select x64 option button for 64-bit Windows 10 OS
  13. Install PHP on IIS
    • Download PHP from https://windows.php.net/ (Select thread safe version)
    • Extract php to C:/php
    • Add to Path System variable
    • on IIS, left click on main server – double click on Handler Mappings – Add module mapping – Enter
      • Request path as *.php
      • Module as FastCGIModule
      • Executable as C:\php\php-cgi.exe (select exe and not dll)
      • Name – as you wish
  14. Install wincache
    • https://freefr.dl.sourceforge.net/project/wincache/development/wincache-2.0.0.8-dev-7.3-nts-vc15-x64.exe
    • Extract to C:/php/ext
  15. Install MariaDB
    • https://mariadb.org/download/?t=mariadb&p=mariadb&r=10.11.1&os=windows&cpu=x86_64&pkg=msi&m=fastmirror
    • Install
  16. Install SSL Cert (Lets Encrypt)
    • Download win-acme from https://www.win-acme.com
    • Extract and run wacs.exe as admin
    • Follow the instructions and SSL will be installed. You are ready to go.