loading...

Microsoft IIS 10.0 – Uploading IIS 10.0 websites to Nano Server

How to configure nginx for Joomla

In this recipe, we are going to upload web pages to v5mysite.com. We will also create the index.htm and v5mysite.htm files with PowerShell commands.

Getting ready

To step through this recipe, you will need a Nano Server 2016 instance with the IIS package installed. For all this installation and configuration work, you should have administrative privileges.

How to do it…

  1. Log in to Windows Server 2016. The IP of Windows Server 2016 is 172.16.15.60 and the name of the server is WIN2016IIS. Press Windows + R on your keyboard. You will get the Run window. We have to open PowerShell ISE with administrative rights, so type in the Run command window RunAs /user:Administrator PowerShell_ISE.exe and press OK .
  2. Now it will ask you the administrator password for your Windows Server 2016 instance (not Nano Server). Type the administrator password and press Enter. You will get the PowerShell window.

 

 

  1. Now we have to remote connect to Nano Server 2016 with the IP 172.16.15.63. Run the command Enter-PSSession –ComputerName "172.16.15.63" -Credential ~\Administrator.
  2. Now you will get a pop-up window for the Nano Server administrator account password. Enter the Nano Server administrator account password and press OK to log in. You have connected successfully. Now run the command Import-module iisAdministration in PowerShell and press Enter. You will get the PowerShell module imported.
  3. We are going to copy iisstart.htm and iisstart.png from C:\inetpub\wwwroot\ to v5mysite-new directory c:\v5mysite-new. Run copy C:\inetpub\wwwroot\iisstart.htm C:\v5mysite-new""copy C:\inetpub\wwwroot\iisstart.png C:\v5mysite-new, as shown here:
  1. Write both the commands and run them. Now you have to check whether these files have been copied. Go to the C:\v5mysite-new folder:
  1. Here, you can see that both iisstart.htm and iistart.png have been copied. Now we have to create two more HTML files for testing. Run the following command:

Welcome to IIS on Nano Server by Ashraf Khan This is Index.htm page" | Out-File -PSPath "c:\v5mysite-new\index.htm" 
"Welcome to IIS on Nano Server by Ashraf Khan This is v5mysite.htm page " | Out-File -PSPath "c:\v5mysite-new\v5mysite.htm
  1. Run the commands one by one. Now let’s check the C:\v5mysite-new folder:
  1. You can see the C:\v5msite-new folder has two more files created.

How it works….

In this recipe, we copied two website pages from C:\inetpub\wwwroot to C:\v5mysite-new, and we created two HTML files, index.htm and v5mysite.htm, with PowerShell commands.

Comments are closed.

loading...