Loading...
Linux Interview Questions

Apache(HTTP&HTTPS)

1. What is Apache HTTP Server?
A) Apache HTTP Server (commonly called Apache) is an open-source web server software that serves web content over HTTP/HTTPS.
It’s one of the most widely used web servers.

2. How do you start/stop/restart Apache service?
A)

systemctl start httpd
systemctl stop httpd
systemctl restart httpd

3. How do you check if Apache is running?
A)

systemctl status httpd
ps aux | grep httpd
ss -tulnp | grep :80

4. How do you enable SSL in Apache?
A)

Install mod_ssl (RHEL) or a2enmod ssl (Ubuntu).

Configure SSL Virtual Host:

<VirtualHost *:443>
ServerName example.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.crt
SSLCertificateKeyFile /etc/ssl/private/example.key

5. How do you check Apache logs?

A)

  • Access log: /var/log/httpd/access_log or /var/log/apache2/access.log
  • Error log: /var/log/httpd/error_log or /var/log/apache2/error.log

6. What are some best practices for securing Apache?
A)

  • Disable directory listing (Options -Indexes).
  • Use mod_security and mod_evasive.
  • Hide server version (ServerTokens Prod, ServerSignature Off).
  • Enable HTTPS and strong ciphers.
  • Regularly update Apache packages.

7. What is HTTP?
A)  HTTP (HyperText Transfer Protocol) is an application-layer protocol used for communication between clients (browsers) and servers over the web.

8. What is the default port number of HTTP and HTTPS?
A)

  • HTTP → Port 80
  • HTTPS → Port 443

9. What is the difference between HTTP and HTTPS?
A)

  • HTTP → Unencrypted communication, less secure.
  • HTTPS → Uses SSL/TLS encryption for secure communication.

10. What is SSL?
A) SSL (Secure Sockets Layer) is a protocol used to secure communication between client and server by encrypting transmitted data.It has been replaced by TLS (Transport Layer Security).

11. What are the types of SSL certificates?
A)

  • DV (Domain Validated) – Verifies domain ownership only.
  • OV (Organization Validated) – Verifies domain + organization.
  • EV (Extended Validation) – Strict verification, shows green bar/organization name.
  • Wildcard SSL – Secures one domain and all its subdomains.
  • Multi-domain (SAN/UC) – Secures multiple domains with one certificate.

12. What is an SSL handshake?
A) The process where the client and server exchange cryptographic information, verify certificates, and establish an encrypted session key for secure communication.

13. What is CSR (Certificate Signing Request)?
A) CSR is a file generated on the server containing public key and organization details, which is sent to a CA to request an SSL certificate.

14. Where are SSL certificates stored in Linux?
A)  Typically in:

  • Certificate → /etc/ssl/certs/ or /etc/pki/tls/certs/
  • Private Key → /etc/ssl/private/ or /etc/pki/tls/private/
Leave a Reply

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