CPT260 CH2 Flashcards

1
Q

For every virutal host on an apache server you need to create a configuration file in the directory /etc/apache2/vhosts.d

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

It instructs the server to execute any file with the .cgi or .pl or .exe as a cgi script

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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”.

A

UserDir public_html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following would create a file (username and password) for user authentication.

A

htpasswd -c /etc/apache2/htpasswd geeko

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The virtual host template could be found in ___________.

A

/etc/apache2/vhosts.d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following Directory blocks would allow for Server Side Includes?

Options +Includes

Options FollowSysLinkx
A

Options +Includes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

This configuratin file is used to specify the IP addresses and TCP/IP ports Apache is listening to.

A

listen.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A request from a browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
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
A

Response from a server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The following are all advantages of using Java for web applications EXCEPT:
portability, performance, reusability, Java is a proprietary product of Microsoft

A

Java is a proprietary product of Microsoft

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

____ _____ are actual web applications that are developed according to the Java servlet specifications.

A

Java servlets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

________ is an extension to the Java servlet specification, which allows developers to separate HTML and application code.

A

JSP (Java Server Pages)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
Which of the following is not an Apache configuration file.   
httpd.conf 
default-server.conf  
vhost.d  
bashrc
A

bashrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Reference http://httpd.apache.org/docs/2.2/mod/core.html for this question.

The ServerRoot directive:

A

sets the directory in which the server lives. Typically it will contain the subdirectories conf/ and /logs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Web applications that are developed in Java are usually distributed in _____ files located in the /usr/share/tomcat/webApps directory.

A

WAR (web archive)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of the following best describes the DocumentRoot?

A

A directory that stores HTTP content on a Web server

17
Q

__________ allows you to create an alias to a directory containing scripts for dynamic content generation.

A

ScriptAlias

18
Q

The command _______ would start the web server at boot time.

A

insserv apache2

19
Q

The default path of the DocumentRoot provided by apache2 is ____________

A

/srv/www/htdocs

20
Q

Which of the following is NOT one of the Apache configuration files?
/mnt/devices/fd0.conf
httpd.conf
default-server.conf

A

/mnt/devices/fd0.conf

21
Q

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

A

build Active Directories in China

22
Q

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.

A

AuthName “Restricted Files”
AuthUserFile /etc/apache2/htpasswd
Require user geeko

23
Q

Response Codes in the 4XX group (such as 404) indicate:

A

Client Error

24
Q

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?

A

UserDir

25
Q

The DirectoryIndex directive sets the list of resources to look for, when the client doesn’t specify the file in the URL. If set to:
DirectoryIndex index.html
a request for http://myserver/docs would return _______.

A

http://myserver/docs/index.html

26
Q

10.0.0.101 - - [24/May/2012:05:57:59 -0400] “POST /cgi-bin/rwcollection.cgi HTTP/1.1”
What is this a sample from and what is the path?

A

The file is the access_log file and it is located in /var/log/apache2 directory.

27
Q

The samba configuration file consist of the general server configuration file and sections for the the share[s] of your file server. The general server configuration starts with the keyword _________.

A

[global]

28
Q

Options in the samba configuration file (smb.conf) are grouped into different sections. Each section starts with a keyword in __________.

A

square brackets

29
Q

Which of the following is not an entry in the global section of the smb.conf file?

A

path

30
Q

The path option would appear in the ___________

A

share section

31
Q

After creating a smb.conf file you can test the syntax of the configuration file by entering the command ________.

A

testparm

32
Q

By default, the the Windows-compatible encrypted password is stored in ___________.

A

/etc/samba/smbpasswd

33
Q

Which of the following commands would be used to display the shares on a samba server with the IP address 10.0.0.99?

A

smbclient -U //10.0.0.9

34
Q

The ____ character indicates comments in the apache2 configuration files. All lines starting with this character are ignored by the apache server.

A

#

35
Q

When an html file containing php code is requested. The webserver opens the file but instead of sending the php code directly bck to the browser it is passed through the PHP ________ first.

A

interpreter

36
Q

A web application archive:

A

war

37
Q

The following directive:
AddHandler cgi-script cgi pl exe
instructs the server to execute any file with the extension .cgi, .pl, or .exe as a cgi-script

A

True

38
Q

the path to the smb.conf file is

A

/etc/samba/smb.conf