{"id":259,"date":"2010-06-17T10:09:48","date_gmt":"2010-06-17T10:09:48","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2010\/06\/17\/apche-interview-questions\/"},"modified":"2020-02-04T10:29:12","modified_gmt":"2020-02-04T10:29:12","slug":"apche-interview-questions","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/apche-interview-questions\/","title":{"rendered":"Apache Interview Questions and Answer &#8211; Job Interview Kit"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4287 aligncenter\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/06\/apche-interview-questions.png\" alt=\"apche-interview-questions-answers\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2010\/06\/apche-interview-questions.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2010\/06\/apche-interview-questions-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Apache Interview Questions &#8211; Apache Job Interview Kit<\/p>\n<p><strong>On a fresh install, why does Apache have three config files &#8211; srm.conf, access.conf and httpd.conf?<\/strong> &#8211; 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.<\/p>\n<p><strong>What\u2019s the command to stop Apache? <\/strong>&#8211; kill the specific process that httpd is running under, or killall httpd. If you have apachectl installed, use apachectl stop.<\/p>\n<p><strong>What does apachectl graceful do?<\/strong> &#8211; It sends a SIGUSR1 for a restart, and starts the apache server if it\u2019s not running.<br \/>\n<strong>How do you check for the httpd.conf consistency and any errors in it?<\/strong> &#8211; apachectl configtest<\/p>\n<p><strong>When I do ps -aux, why do I have one copy of httpd running as root and the rest as nouser?<\/strong> &#8211; You need to be a root to attach yourself to any Unix port below 1024, and we need 80.<\/p>\n<p>But I thought that running apache as a root is a security risk? &#8211; That one 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.<\/p>\n<p><strong>Why do I get the message &#8220;\u2026 no listening sockets available, shutting down&#8221;?<\/strong> &#8211; In Apache 2 you need to have a listen directive. Just put Listen 80 in httpd.conf.<\/p>\n<p><strong>How do you set up a virtual host in Apache? <\/strong><br \/>\n&lt;VirtualHost www.techinterviews.com&gt;<br \/>\nServerAdmin admin@techinterviews.com<br \/>\nDocumentRoot \/home\/apache\/share\/htdocs\/hostedsites<br \/>\nServerName www.techinterviews.com<br \/>\nErrorLog \/home\/apache\/logs\/error\/hostedsites\/error_log<br \/>\nTransferLog \/home\/apache\/logs\/access\/hostedsites\/access_log<br \/>\n&lt;\/VirtualHost&gt;<\/p>\n<p><strong>What is ServerType directive?<\/strong> &#8211; 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.<\/p>\n<p><strong>What is mod_vhost_alias?<\/strong> &#8211; It allows hosting multiple sites on the same server via simpler configurations.<\/p>\n<p><strong>What does htpasswd do?<\/strong> &#8211; It creates a new user in a specified group, and asks to specify a password for that user.<br \/>\nIf you specify both deny from all and allow from all, what will be the default action of Apache? &#8211; In case of ambiguity deny always takes precedence over allow.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache Interview Questions &#8211; Apache Job Interview Kit On a fresh install, why does Apache have three config files &#8211; srm.conf, access.conf and httpd.conf? &#8211; The first two are remnants&#8230; <\/p>\n","protected":false},"author":1,"featured_media":4287,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[52],"tags":[767,420,3916,3920,3919,3918,3917,3921,3923,766,3922,507,1553,482,1830,3910,637],"class_list":["post-259","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-questions-answers","tag-answer","tag-apache","tag-apache-interview","tag-apache-interview-guide","tag-apache-interview-qa","tag-apache-interview-questions-answers","tag-apache-job-interview","tag-apache-job-interview-kit","tag-apache-server","tag-interview","tag-interview-questions-answer-for-apache","tag-list","tag-most-asked","tag-questions","tag-selected","tag-sets","tag-top"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=259"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"predecessor-version":[{"id":9994,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/259\/revisions\/9994"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/4287"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}