Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Assume my webserver hosts multiple domains. Where is my directory that contains the active web domains?

share|improve this question
3  
Welcome to Ask Ubuntu! This probably should be on a different Stack Exchange site to ask questions of this nature (see the FAQ). However, it would be on-topic at the Unix & Linux Stack Exchange or Server Fault –  Ringtail Dec 6 '12 at 4:31
    
Questions about how to use Ubuntu programs are generally on-topic for Ask Ubuntu, and this is no different. –  Eliah Kagan Jan 16 '13 at 17:05

1 Answer 1

/etc/apache2/sites-available/ hold all available sites with 1 file per site. The domains are inside the files.

/etc/apache2/sites-enabled holds the sites that are active. Again: the domains are inside the files. These files can be symlinks to /etc/apache2/sites-available/.

Example:

<VirtualHost xx.yyy.com:80>
    ServerAlias xx.yyy2.com
    ServerAlias xxxxx
    AddHandler cgi-script .cgi
    DocumentRoot /dir/dir/dir/
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>

    ErrorLog /var/log/apache2/error.log

    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On
 </VirtualHost>

Try to keep files outside of /var/www/. /var is often not a separate partition and is also used for storing printer files and mysql files so if any of these 3 make it fill up your system using the machine to fix this problem might be more difficult than needed.

It also makes it easier when you need upgrade or re-install your system, add more space to your system or need to use several different operating systems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.