Tuesday, May 17, 2011

Question from Apache


1. In which folder are Java Applications stored in Apache?
Java applications are not stored in Apache, it can be only
connected to a other Java webapp hosting webserver using the
mod_jk connector
2.Is running apache as a root is a security risk?
No.root process opens port 80, but never listens to it, so
no user will actually enter the site with root rights. If
you kill the root process, you will see the other kids
disappear as well.
3.If you specify both deny from all and allow from all, what will be the default action of Apache?
deny will be taken first.
4.What does htpasswd do?
The htpasswd protects a file with a password
5.What is mod_vhost_alias?
This module creates dynamically configured virtual hosts, by allowing the IP address and/or the Host: header of the HTTP request to be used as part of the pathname to determine what files to serve. This allows for easy use of a huge number of virtual hosts with similar configurations.
6.What is ServerType directive?
It defines whether Apache should spawn itself as a child process (standalone) or keep everything in a single process (inetd). Keeping it inetd conserves resources. This is deprecated, however.
7.How do you set up a virtual host in Apache?
ServerAdmin admin@test.com
DocumentRoot /home/apache/share/htdocs/hostedsites
ServerName www.test.com
ErrorLog /home/apache/logs/error/hostedsites/error_log
TransferLog /home/apache/logs/access/hostedsites/access_log
8.How do you check for the httpd.conf consistency and any errors in it?
apachectl configtest
9.What does apachectl graceful do?
Gracefully  restarts  the  Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal  restart in  that  currently  open  connections  are not aborted. A side effect is that old log files will  not be  closed  immediately. This  means that if used in a log rotation script, a substantial delay may be necessary to ensure that  the  old  log  files  are closed before processing them. This command automatically checks
the configuration files as in configtest before initiating  the restart  to  make sure Apache doesn?t die.
This is equivalent to apachectl -k graceful.
Actually it sends a SIGUSR1 for a restart. The USR1 or graceful signal causes the parent process to advise the children to exit after their current request (or to exit immediately if they’re not serving anything). The parent re-reads its configuration files and re-opens its log files. As each child dies off the parent replaces it with a child from the new generation of the configuration, which begins serving new requests immediately.
10.What is the command to stop Apache?
service httpd stop & apachectl stop
11.On a fresh install, why does Apache have three config files – srm.conf, access.conf and httpd.conf?
The first two are remnants from the NCSA times, and
generally you should be ok if you delete the first two, and
stick with httpd.conf.
12.Hi, When i’m starting startup.bat file of Tomcat server it isn’t started. DOS window appears for a Second only. What should I do?
Your set up might have been not done well. Make sure you have added tomcat root directory path in the CATALINA_HOME environment variable and added the bin path in the path variable
13.What is the difference between Tomcat 4.1 and Tomcat 5.0?
Web server (for development) that supports servlets 2.3 and JSP 1.2 (Tomcat 4) or servlets 2.4 and JSP 2.0 (Tomcat 5).
14.please let me know the configuration or architecture how
tomcat used. give me a layman example The Architecture of Tomcat
Tomcat 4 is a complete rewrite of its ancestors. At the core of this rewrite is the Catalina servlet engine, which acts as the top-level container for all Tomcat instances.
With this rewrite of Tomcat comes an entirely new architecture composed of a grouping of application containers, each with a specific role. The sum of all of these containers makes up an instance of a Catalina engine.
The following code snippet provides an XML representation of the relationships between the different Tomcat containers:
This instance can be broken down into a set of containers including a server, a service, a connector, an engine, a host, and a context. By default, each of these containers is configured using the server.xml file, which we describe
later in more detail.
The Server
The first container element referenced in this snippet is the element. It represents the entire Catalina servlet engine and is used as a top-level element for a single Tomcat instance. The element may contain one or more containers.
The Service
The next container element is the element, which holds a collection of one or more elements that share a single element. N-number of elements may be nested inside a single element.
The Connector
The next type of element is the element, which defines the class that does the actual handling requests and responses to and from a calling client application.
The Engine
The third container element is the element. Each defined can have only one element, and this single component handles all requests received by all of the defined components defined by a parent service.
The Host
The element defines the virtual hosts that are contained in each instance of a Catalina . Each can be a parent to one or more Web applications, with each being represented by a component.
The Context
The element is the most commonly used container in a Tomcat instance. Each element represents an individual Web application that is running within a defined . There is no limit to the number of contexts that can be defined within a .
15.what is tomcat?can we deploy a servelet in tomcat?
Tomcat is a webserver, Which is support 3 -tier archeticture..
Yes we can
in web.xml


16.if i delete my java class files after the compile?but it does not goes to the recycle bin.Now i want to get the java class file
Yes  you can
17.what  is different between web server and application server?
Web server supports only http protocol
Where as application server supports any type of protocols such as tcp/ip,http etc..
18.what is webserver? why it is used ?
Transaction with HTTP request and HTTP response is called webserver.
Using the internet listening the HTTP request and providing the HTTP response is also called webserver.It gives only html output.It will not process business logic .They can provide Http server.They are static.
19. Can we use Active Server Pages (ASP) with Apache?
Apache Web Server package does not include ASP support.
However, a number of projects provide ASP or ASP-like
functionality for Apache. Some of these are:
Apache::ASP
mod_mono
Chilisoft ASP
20.Why doesn’t Apache include SSL?
SSL (Secure Socket Layer) data transport requires encryption, and many governments have restrictions upon the import, export, and use of encryption technology.
If Apache included SSL in the base package, its distribution would involve all sorts of legal and bureaucratic issues, and it would no longer be freely
available.
Also, some of the technology required to talk to current clients using SSL is patented by RSA Data Security, who restricts its use without a license.
21.Does Apache come with Java support?
The base Apache Web server package does not include support for Java
22.This is very strange.
I am running apache 2.2 (compiled with gcc and all default params) on
AIX 5.2.0.6 – 64 bit kernel.
I edit the httpd.conf file to listen on two different
ports –
Listen 8000
Listen 8001
The server will not start no errors or anything it just accepts the
command but nothing starts.
I can comment out on of the entires and everything starts up just fine
minus the commented out port.
Listen 8000
#Listen 8001
So, my problem is that I cannot get apache to listen on two ports, any
ideas? Has someone else seen this before?
Thanks,
try setting environment flag:
ac_cv_o_nonblock_inherited=no
just before running configure…
and also
apache is a server.we can run each server in unique listen port so we are unable to run same server in two different ports.but u can run on different unique ports. in apache webserver u change that  in httpd.conf listen
port to 8080 (default is 80).that listen port belongs to http port for reciving requests and send responces.so please try to understand that which port belongs to which one.
23.Does Apache include any sort of database integration?
Apache is a Web (HTTP) server, not an application server. The base package does not include any such functionality. See the PHP project and the mod_perl project
for examples of modules that allow you to work with databases from within the Apache environment.
24.What is Apache?
Apache is a freely available Web server that is distributed under an “open source” license. Version 2.0 runs on most Unix-based operating systems (such as Linux, Solaris,Digital UNIX, and AIX), on other UNIX/POSIX-derived systems(such as Rhapsody, BeOS, and BS2000/OSD), on AmigaOS, and on Windows 2000. According to the Netcraft (www.netcraft.com)
Web server survey in February, 2001, 60% of all Web sites on the Internet are using Apache (62% including Apache derivatives), making Apache more widely used than all other Web servers combined.
25.Does  Apache act as a Proxy server?
Yes, It acts as proxy also by using the mod_proxy module

No comments:

Post a Comment