Devops Technical Test
Devops Technical Test
Devops Technical Test
2) You have a web site which is being aggressively spidered by a number of systems given the site apache
access log is in /var/logs/httpd and in the following format
62.210.215.117 - - [20/Aug/2019:15:26:14 +0100] "GET /feed/ HTTP/1.1" 301 - "-" "Mozilla/5.0 (X11; L
inux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36"
54.198.100.173 - - [20/Aug/2019:15:37:40 +0100] "GET /whmcs/announcementsrss.php HTTP/1.1" 200
27936 "-" "curl"
188.165.192.220 - - [20/Aug/2019:15:40:12 +0100] "GET / HTTP/1.1" 301 - "-" "Mozilla/5.0 (Windows
NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
How would you produce a list of the top 20 IP addresses requesting pages from the site?
3) Given the following .htaccess file why would the redirect to https not work?
IndexIgnore *
Options -Indexes
4) Given an AWS Linux Apache server where the configuration root is /etc/httpd. You are trying to find the
configuration for a vhost which directories and files would you check to find the configuration?
5) Given the following puppet heira data extract, how would you add an additional site URL
www.bigbankuniversity.com to access the site under the webroot /var/web/eic?
www.bigbankearlyincareer.co.uk:
serveraliases:
- 'bigbankukgraduates.com'
docroot: '/var/web/eic'
directories:
- path: '/var/web/eic'
allow_override:
- 'All'
www.bigbankjobsredeployment.co.uk:
serveraliases:
- 'bigbankjobsredeployment.co.uk'
docroot: '/var/web/redep'
directories:
- path: '/var/web/redep'
allow_override:
- 'All'
6) A system is being reported as unresponsive by the client, on examination you find that the Amazon
instance system status check is failing. What action should you undertake to remedy this situation?
7) Can you explain simply what actions the following CloudFromation Template does?
AWSTemplateFormatVersion: 2010-09-09
Parameters:
ELBarn:
Type : String
Description: xxxxx
CertArn:
Type : String
Description: xxxxxxxxxxx
DefaultTargetARN:
Type : String
Description: xxxxxxxxx
Resources:
HttpListener:
Type : AWS::ElasticLoadBalancingV2::Listener
DeletionPolicy: "Retain"
Properties :
DefaultActions:
- Type : redirect
Protocol : HTTPS
Port : 443
StatusCode: HTTP_301
LoadBalancerArn: !Ref ELBarn
Port : 80
Protocol : HTTP
HttpsListener:
Type : AWS::ElasticLoadBalancingV2::Listener
DeletionPolicy: "Retain"
Properties :
DefaultActions:
- Type: forward
TargetGroupArn: !Ref DefaultTargetARN
LoadBalancerArn: !Ref ELBarn
Port : 443
Protocol : HTTPS
SslPolicy : ELBSecurityPolicy-TLS-1-2-Ext-2018-06
Certificates :
- CertificateArn: !Ref CertArn
Outputs:
HttpsListenerARN:
Description: Https Listener ARN
Value: !Ref HttpsListener
8) An application written in PHP 7.1 is failing while uploading certain files, how would you check what the
issue is and what parameters would you change to resolve the issue.
9) You have a server cluster behind a load balancer running an application, users are reporting being
randomly logged out of the system, what is a possible cause of this?
10) You have a MySQL database that is consuming an excessive amount of CPU, how would you diagnose this
issue. And given the query information below how would improve this?