Apache Interview Questions For Freshers

1 Which module is required to enable SSL?

The mod_ssl module must be uncommented before SSL implementation.

1) What do you mean by Apache Web Server?

Apache web server is the HTTP web server that is open source, and it is used for hosting the website.

How to ensure Apache listens to only one IP address on the server?

This is often needed when you have multiple IPs on the server. To ensure Apache listens only on specified IP then you need to explicitly mention IP and port in Listen directive.

Ex:

34) How to deploy war or JAVA applications in Apache?

I am afraid, Apache is a Web Server, and Java-based application deployment is not possible with it. However, you can integrate Java application servers like WebLogic, WebSphere, JBoss where you can deploy war, ear files

1 How to secure a Website hosted on Apache Web Server?

There are multiple ways to secure the Apache webserver including the following.

  • Implementing SSL
  • Integrating with WAF (Web Application Firewall) like ModSecurity, etc.
  • Using cloud-based security provider
  • 42) Apache runs as which user? and location of main config file?.

    Apache runs with the user “nobody” and httpd daemon. Apache main configuration file: /etc/httpd/conf/httpd.conf (CentOS/RHEL/Fedora) and /etc/apache2.conf (Ubuntu/Debian).

    18) How will you kill the Apache process?

    We can use the below command: Kill $PIDNUMBER

    9) Explain the difference between location and Directory.

    For setting the element related to the URL, we use:: Location. It refers to the location of the files system of the server:: Directory.

    15) How will you enable the PHP scripts on the server?

    We have to follow the steps : First, install mod_php. Second run the command : AddHandler application/x-httpd-PHP .phtml .php

    3 What are the different flavors of Apache webserver you know?

  • IBM HTTP Server – known as IHS and often used with IBM WebSphere Application Server
  • Oracle HTTP Server- known as OHS often used with Oracle Weblogic server
  • 2 How to configure Apache log, so it captures the time taken to serve a request?

    You can add “%D” in httpd.conf file under LogFormat directive to capture the response time taken to serve the request. It will show time in microseconds.

    Restart the Apache web server, and you can see the results.

    2 How to perform Apache performance benchmark?

    You can use a tool like ApacheBench, SIEGE to perform the load test on web servers including Apache. Another option to perform stress test online to see the overall how web application performs under load.

    6) What do you mean by the Alias Directive?

    The alias directive is responsible for mapping resources in the file system.

    2 How to deploy war or JAVA applications in Apache?

    I am afraid, Apache is a Web Server, and Java-based application deployment is not possible with it. However, you can integrate Java application servers like WebLogic, WebSphere, JBoss where you can deploy war, ear files.

    17) What do you mean by Mod_evasive?

    It is the module that helps the webserver to prevent web attacks, e.g., DDOS.

    How to know if a web server is running?

    There are multiple ways to find this.

  • Login to a web server and grep for “httpd” process
  • Check for any alert in your monitoring dashboard.
  • Check if your apache IP:port is accessible in the browser
  • Ex: http://yourapacheserver.com

  • Check if configured IP and port is listening on the server with netstat
  • 7) What do you mean by the log files of the Apache webserver?

    we can access the log files of Apache server from the below location: /var/log/httpd/access_log and error log from /var/log/httpd/error_log.

    38) How to verify httpd.conf file to ensure no configuration syntax error?

    httpd –t will help you to check the syntax.

    [[email protected] httpd]# /usr/sbin/httpd -t Syntax OK [[email protected] httpd]#

    Alternatively, you may use the apachectl command as well.

    [roo[email protected] ~]# /usr/sbin/apachectl configtest Syntax OK [[email protected] ~]#

    Apache Interview Questions and Answers for Both Fresher & Experience

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *