Apache 2.2.14 (ubuntu) & Ubuntu 10.04 LTS
Information Resources
http://httpd.apache.org/docs/2.2/en/
Shell Commands
sudo apache2ctl sudo apache2ctl -v //show version number sudo apache2ctl start sudo apache2ctl stop sudo apache2ctl restart
Location of Configuration Files
apache config: etc/apache2/apache2.conf site configs are in: /etc/apache2/sites-available default site config: /etc/apache2/sites-available/default
If you are not sure if this is the file apache is using to load the configuration from, try this:
- Put a typo into the configuration file, like “xyz”.
- Let apache check the configurations syntax
user@machine:~$ sudo apache2ctl -t Syntax error on line 240 of /etc/apache2/apache2.conf: Invalid command 'xyz', perhaps misspelled or defined by a module not included in the server configuration
Setting the DocumentRoot
Change the DocumentRoot
directive in the default site configuration (/etc/apache2/sites-available/default
) from
DocumentRoot /var/www
to your path.