Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

http://installingcats.com

Remove sudo password request when deploying

Change the sudoers list by adding a NOPASSWD: [Cmnd_Alias] line.

In terminal: visudo

# Cmnd alias specification
Cmnd_Alias HTTPD = /usr/local/sbin/apachectl, /etc/init.d/apache2

# User privilege specification
[user] ALL = NOPASSWD: HTTPD


Be sure that the NOPASSWD line is last in visudo, else, it risks being overwritten by later specifications.

restart Apache process

To reload conf files

To verify changes to .conf files parse OK.
apachectl -t


To issue soft restart (waits for connections to close)
apachectl graceful


Forced restart, dropping connections as necessary.
apachectl restart

Apache - IfModule dir_module directive within httpd-vhosts.conf

Change directory listing / default files served when hitting a directory.

This can be placed directly within the VirtualHost directives.

<IfModule dir_module>
  DirectoryIndex index.html index.php
</IfModule>