CPT260 CH2 Flashcards
(38 cards)
For every virutal host on an apache server you need to create a configuration file in the directory /etc/apache2/vhosts.d
T
Which is true of the following directive:
AddHandler cgi-script cgi, pl, exe
It instructs the server to only execute files in the cgi-scripts directory.
It instructs the server to execute any file with the extension .cgi or .pl or .exe as a cgi scrip
It allows cgi scripts to be interpreted by TomKat
Causes the server to handle any errors as an executeable
It instructs the server to execute any file with the .cgi or .pl or .exe as a cgi script
The URL http://109.14.2.15/~agreen/interest.html is entered in the Firefox browser and a web page is displayed. Which of the following directives allows for this URL to “work”.
UserDir public_html
Which of the following would create a file (username and password) for user authentication.
htpasswd -c /etc/apache2/htpasswd geeko
The virtual host template could be found in ___________.
/etc/apache2/vhosts.d
Which of the following Directory blocks would allow for Server Side Includes?
Options +Includes
Options FollowSysLinkx
Options +Includes
This configuratin file is used to specify the IP addresses and TCP/IP ports Apache is listening to.
listen.conf
The text below is an example of a:
GET /simple.html HTTP/1.0
User-Agent: Mozilla/4.5 [en] (X11; SunOS 5.5.1 sun4m)
Accept: image/gif, image/x-xbitmap, image jpeg, /
A request from a browser
The text below is a: HTTP/1.1 200 OK Date: Mon, 05 Jan 2010 00:33:10 GMT Server: Apache/1.3.1 (Unix) Last-Modified: Tues, 20 Dec 2009 21:00 GMT
Response from a server
The following are all advantages of using Java for web applications EXCEPT:
portability, performance, reusability, Java is a proprietary product of Microsoft
Java is a proprietary product of Microsoft
____ _____ are actual web applications that are developed according to the Java servlet specifications.
Java servlets
________ is an extension to the Java servlet specification, which allows developers to separate HTML and application code.
JSP (Java Server Pages)
Which of the following is not an Apache configuration file. httpd.conf default-server.conf vhost.d bashrc
bashrc
Reference http://httpd.apache.org/docs/2.2/mod/core.html for this question.
The ServerRoot directive:
sets the directory in which the server lives. Typically it will contain the subdirectories conf/ and /logs
Web applications that are developed in Java are usually distributed in _____ files located in the /usr/share/tomcat/webApps directory.
WAR (web archive)
Which of the following best describes the DocumentRoot?
A directory that stores HTTP content on a Web server
__________ allows you to create an alias to a directory containing scripts for dynamic content generation.
ScriptAlias
The command _______ would start the web server at boot time.
insserv apache2
The default path of the DocumentRoot provided by apache2 is ____________
/srv/www/htdocs
Which of the following is NOT one of the Apache configuration files?
/mnt/devices/fd0.conf
httpd.conf
default-server.conf
/mnt/devices/fd0.conf
In addition to delivering data to the web browser, a web server can perform all of the following task EXCEPT:
logging access to a file
limiting access to specific web pages
encrypting the connection between a server and browser
build Active Directories on servers in China
build Active Directories in China
Which of the following Directory blocks would require a password to access files in the directory.
Options +Includes
AuthName “Restricted Files”
AuthUserFile /etc/apache2/htpasswd
Require user geeko
Allow, Deny
Allow from Includes
None of the above directories require passwords for access.
AuthName “Restricted Files”
AuthUserFile /etc/apache2/htpasswd
Require user geeko
Response Codes in the 4XX group (such as 404) indicate:
Client Error
In our apache2 configuraction files the ________ directive is set to public_html. Thus, a URL such as
http://10.0.0.1/~joe/hobbies.html
would return the hobbies.html file which is in the /home/joe/public_html/ directory.
What is the directive?
UserDir