Apache important questions


 If you specify both deny from all and allow from all, what 
will be the default action of Apache?


It also depends on Order directive
order allow, deny # connection will be denied
order deny, allow # connection will be allowed

 what is  apachectl graceful

Note that you will either need to be running as root or use the "sudo" command in order to run this command.

If Apache is not already running it will be started. If it is already running then it will reload with the new changes but will not abort active connections, meaning that anyone who is in the middle of downloading something will continue to be able to download it.

Before restarting the Apache service a check will be done on the configuration files to ensure they are valid. If there is an error in them the error will be displayed and the Apache service will continue running using the old settings. You need to correct your settings before attempting to restart again.


How do you check for the httpd.conf consistency and any errors in it? -

apachectl configtest


When I do ps -aux, why do I have one copy of httpd running as root and the rest as nouser?


 You need to be a root to attach yourself to any Unix port below 1024, and we need 80.

running apache as a root is a security risk?
-

No, 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.

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.



No comments:

Other Articles

Enter your email address: