I am a noob and I just installed Apache2 on Ubuntu 12.04 machine. When I read /etc/apache2/apache2-conf, I see that the ServerRoot directive is commented out. I did not understand this. Why one would comment out -- ServerRoot "/etc/apache2" -- directive? Is it not necessary or is it defined somewhere else?
ServerRoot specifies where the subdirectories conf and logs can be found. If you start Apache with the -f (file) option, you need to include the ServerRoot directive.
apache2 is the Apache HyperText Transfer Protocol (HTTP) server program. It is designed to be run as a standalone daemon process.
In Apache on Ubuntu, all the virtual host configuration files are stored under /etc/apache2/sites-available directory.
On Ubuntu, the Apache web server serves documents stored in the var/www/html directory by default. This directory is referred to as the document root.
In Ubuntu your install should be in /etc/apache2/. If everything is installed in /etc/apache2/ you could/should uncomment that line. It will run without you uncommenting, but should be grounded on the install directory as a reference.
There are many lines commented by default so that this works out of the box without much coaxing. You will need to go back through and adjust apache2.conf and possibly sites-enabled as well.
Your Docroot by default should be /var/www/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With