Question

Due: 10/31/17 Submit under: Assignmen8 folder (only) Chapter-10: Apache Web Server Explain that a web server is a network computer with the primary role of serving Web pages to clients on request. 1、 2. Explain that the HTTP-Server is a YaST module for configuring Apache. The package name is yast2-http-server, and it can be installed from YaST Software Management. Discuss the following default settings for a Web server in Apache: DocumentRoot . Alias . ScriptAlias . Include . Server Name . Server Administration 3. What is the difference between PHP and HTML? 4. 5. 6. Why access control by User-Agent is considered an unreliable technique? How would you use the host address of visitors site? to restrict access to your Web

help!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)Answer:

A web server is a computer system that processes requests via HTTP, the basic network protocol used to distribute information on the World Wide Web. The term can refer to the entire system, or specifically to the software that accepts and supervises the HTTP requests.

web server is a network computer with the primary role of serving web pages to clients on request.It can also host a web site along with images ,style sheets,and other contents so that clients can acess web pages.

although a server is commonly thought of as a network device that provides resources to clients, a webserver differs slightly in that it also receives data from clients.

3)Answer:

DocumentRoot:

The DocumentRoot is the directory which contains most of the HTML files which are served in response to requests. The default DocumentRoot for both the non-secure and secure Web servers is the /var/www/html directory. For example, the server might receive a request for the following document:

http://example.com/foo.html

The server looks for the following file in the default directory:

/var/www/html/foo.html

To change the DocumentRoot so that it is not shared by the secure and the non-secure Web servers.

Alias:

The Alias setting allows directories outside the DocumentRoot directory to be accessible. Any URL ending in the alias automatically resolves to the alias' path. By default, one alias for an icons/ directory is already set up. An icons/ directory can be accessed by the Web server, but the directory is not in the DocumentRoot.

ScriptAlias:

The ScriptAlias directive defines where CGI scripts are located. Generally, it is not good practice to leave CGI scripts within the DocumentRoot, where they can potentially be viewed as text documents. For this reason, a special directory outside of the DocumentRoot directory containing server-side executables and scripts is designated by the ScriptAlias directive. This directory is known as a cgi-bin and set to /var/www/cgi-bin/ by default.

It is possible to establish directories for storing executables outside of the cgi-bin directory.

Include:

Include allows other configuration files to be included at runtime.

The path to these configuration files can be absolute or relative to the ServerRoot.

ServerName:

ServerName specifies a hostname and port number (matching the Listen directive) for the server. The ServerName does not need to match the machine's actual hostname. For example, the Web server may be www.example.com, but the server's hostname is actually foo.example.com. The value specified in ServerName must be a valid Domain Name Service (DNS) name that can be resolved by the system — do not make something up.

The following is a sample ServerName directive:

ServerName www.example.com:80

When specifying a ServerName, be sure the IP address and server name pair are included in the /etc/hosts file.

ServerAdmin:

Sets the ServerAdmin directive to the email address of the Web server administrator. This email address shows up in error messages on server-generated Web pages, so users can report a problem by sending email to the server administrator.

By default, ServerAdmin is set to root@localhost.

A common way to set up ServerAdmin is to set it to [email protected]. Then alias webmaster to the person responsible for the Web server in /etc/aliases and run/usr/bin/newaliases.

4)Answer:

Difference between HTML and PHP:

HTML is a language used to describe to a browser how to display text and other objects in a browser window. It is not a programming language. HTML works on a client computer (the system on which the page is being viewed).
PHP is a scripting language, and can be used to create web pages written in HTML.

PHP runs on the server (the system from which the page comes), and is a full-fledged programming language.So while HTML is able to show texts and multimedia, PHP is a programming language that builds upon a basic HTML skeleton to add dynamic content to a page.

The Hypertext Markup Language or HTML is the oldest and most commonly used method of creating web pages. It is very simple and just within a few minutes, a coder can easily create a simple web page with text and a couple of images. You can do the same with PHP since its output gets processed by HTML and if you inserted the same HTML code you would also get the same result. This is due to the fact that the end product of PHP code, and what gets sent to the browser is in HTML. So the browser would get the same HTML code if you set it as the output of your PHP script, but if you want to take advantage of the advanced features that PHP offers you would need to spend a little bit more time.

Coding in HTML means that the pages you code would always appear the same depending on which browser you are using. PHP allows the coder to create an HTML page or section of it dynamically. As an example, if you want to create a site that would display all the letters of the alphabet individually in its own page, you would need to create a page for each letter if you are using HTML but you would only need one page with PHP. PHP is also capable of taking data and use or manipulate it to create the output that the user desires. A web page that can take two numbers, add it, and present the result to the user is very easy to do with PHP but not with HTML.

Because of the additional features of PHP, it needs to implement a proper structure in coding. Unlike HTML where anything you put in creates an output, PHP would not give you an output if something is wrong with your code. The learning curve of PHP is also much steeper compared to HTML. You would need a considerably longer time to learn PHP than in learning HTML though you would still need to learn HTML to learn PHP.


Add a comment
Know the answer?
Add Answer to:
help! Due: 10/31/17 Submit under: Assignmen8 folder (only) Chapter-10: Apache Web Server Explain that a web...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Part - Web Server Setup and Demonstration (AJ Objective The objective of this assignment is to...

    Part - Web Server Setup and Demonstration (AJ Objective The objective of this assignment is to some HTTP as application layer protocol and TCP as reliable transport layer protocol HTTP is carried by TCP. Also, in the assignment you will investigate the working of client-server mechanism from both application and networking perspective There are several different ways to setup an HTTP server, including through Apache Tomcat, Apache Glassfish that integrales in an IDE such as Eclipse/NetBeans or even a browser...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT