Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache2 and ServerRoot directive in Ubuntu

Tags:

ubuntu

apache2

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?

like image 390
Ajure Avatar asked May 22 '13 21:05

Ajure


People also ask

What is ServerRoot in Apache configuration?

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.

What is apache2 process on Ubuntu?

apache2 is the Apache HyperText Transfer Protocol (HTTP) server program. It is designed to be run as a standalone daemon process.

Where is Apache config file in Ubuntu?

In Apache on Ubuntu, all the virtual host configuration files are stored under /etc/apache2/sites-available directory.

Where is Apache root directory Ubuntu?

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.


1 Answers

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/

like image 193
apesa Avatar answered Sep 18 '22 15:09

apesa