🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Introduction to Web Servers.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

1.2a Setting up Web Server Web Server Discussion of what web server is, its function and content types. This topic will use Internet Information Services (IIS) web server of Microsoft. The laboratory should have the following requirements: ï‚· Computer or Laptop ï‚· Windows 11 Operating Syste...

1.2a Setting up Web Server Web Server Discussion of what web server is, its function and content types. This topic will use Internet Information Services (IIS) web server of Microsoft. The laboratory should have the following requirements: ï‚· Computer or Laptop ï‚· Windows 11 Operating System ï‚· Network connectivity ï‚· Visual Studio Codes VSCode Objectives 1. Understand the Role of Web Servers 2. Learn Basic Configuration 3. Deploy a Simple Website Background Web server is an application that continually connected to the Internet. It is a software that runs on your computer that uses HTTP (Hypertext Transfer Protocol) such as Apache, Nginx, Node.js or IIS. The primary function of a web server is handling request for web pages and respond to the request by transmitting the web page or other resources such as images, videos or documents that are requested from the client. Web server may also utilize scripting languages such as PHP, Ruby, Python or C# (.Net) for generating dynamic content. Instruction Instructional guide on how to install web server on its basic installation and configuration. Most of the features of web server application were left on its default state during the setup. This topic discuss the installation of an Internet Information Services (IIS) as the web server. Other web server has a different installation guide but the concept of configuration is the same. Part 1. Installation of a Web Server 1. Verify if IIS is installed. 1. Click on Search icon on the Windows 11 taskbar. 2. Type "Internet Information Services" or "IIS". 3. If you can see the application and and has a details about IIS on the right side of the window pane, then IIS is installed. You may now proceed to Part 2. Basic Configuration of an IIS. 4. If IIS is not installed, proceed to step 2. Open Windows Features 2. Open Windows Features 1. Click on the Search icon on the Windows 11 taskbar. 2. Type "Turn Windows features on or off" or you may type any keyword that contains the name of an application. 3. Enable Internet Information Services (IIS) 1. In the Windows Features dialog, find and check the box for Internet Information Services. 2. Expand the options to select additional features like Web Management Tools and World Wide Web Services if these two are unchecked. Leave other features on their default. 3. Click OK to start the installation process. Wait for the installation to complete and restart your PC if prompted. 4. Run IIS Manager. After installation, go to the Search bar again, type IIS, and select Internet Information Services (IIS) Manager to open it. 5. Verify Installation. Open a web browser and type http://localhost to check if the IIS welcome page is displayed, indicating that IIS is successfully installed. Part 2. Basic Configuration of an IIS This part will only show where to configure if you desired to change listening port number, folder location of your website and the default HTML document filename to open as the default HTML document. 1. Open IIS. go to the Search bar again, type IIS or Internet Information Services, and select Internet Information Services (IIS) Manager to open it. 2. Access your default website. 1. Access your website by expanding the Computer or Server name inside Connections window pane. To expand, click on greater than icon (>) next to the Computer or Server name. 2. Expand the Sites by also clicking on the greater than icon (>) next to Sites label. 3. Under Sites, you can see Default Web Site item. Click on Default Web Site and configuration options will appear on the main area and other configuration on the right side Action window pane that is related to your default web site. 4. You can freely explore all those configuration settings. 3. Basic Settings and Bindings. 1. Bindings let you define which port to listen for our web server. You may change the port number of http from port 80 to any port within dynamic and private ports (https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbersLin ks to an external site.) 2. Basic Settings let you define Application Pool and Physical Path of your website files. Physical Path provides directory mapping so when the client request for the resources, web server knows what drive and folder to access. 4. Default Document. If you like to customize or change the filename to access as the default filename when accessing root directory or folder, define the desired filename under Default Document. Actions like Add, Disable and Revert to Parent may be performed. 5. Opening your folder in File Explorer. Part 3. Creating Simple Website Your folder name should be in this format: CCS2110LastnameA2a Your filename should not contain any spaces and special characters. 1. Set Up Your Project Folder 1. Create a Project Folder: 1. Navigate to a location on your computer where you want to create your project (e.g., Documents or Desktop). 2. Create a new folder and name it CCS2110LastnameA2a. 2. Open the Project in VSCode 1. Launch VSCode. 2. Open the Project Folder: Click on File in the menu bar. Select Open Folder... and choose the CCS2110LastnameA2afolder you created. 3. Create HTML Files 1. Create the Welcome Page: 1. In VSCode, right-click on the CCS2110LastnameA2a folder in the Explorer pane. 2. Select New File and name it index.html. 3. Add HTML Content to index.html: 1. Open index.html and add the following HTML code: Welcome Page Welcome to Our Website Home About Us Introduction Welcome! This is the welcome page of our simple website. 2. Create the About Us Page: 1. Right-click on the CCS2110LastnameA2a folder again. 2. Select New File and name it about.html. 3. Add HTML Content to about.html: 1. Open about.html and add the following HTML code: About Us About Us Home About Us Introduction Who We Are We are a team dedicated to providing quality content. 3. Create the Introduction Page: 1. Right-click on the CCS2110LastnameA2a folder once more. 2. Select New File and name it introduction.html. 3. Add HTML Content to introduction.html: 1. Open introduction.html and add the following HTML code: Introduction Introduction Home About Us Introduction Getting Started This page introduces the purpose of our website. 4. Copy the Project Folder to IIS 1. Open File Explorer: Navigate to the CCS2110LastnameA2a folder you created. 2. Copy the Folder: Right-click on the CCS2110LastnameA2a folder and select Copy. 3. Navigate to the IIS Directory: In File Explorer, go to C:\inetpub\wwwroot. 4. Paste the Folder: Right-click in the wwwroot directory and select Paste. This will copy your CCS2110LastnameA2a folder into the IIS root directory. 5. Accessing your website 1. Open your browser and type http://localhost/CCS2110LastnameA2a/ in address bar of your browser. 2. The default document will be loaded (index.html) on the screen.

Use Quizgecko on...
Browser
Browser