Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed Ubuntu 10.04 LAMP server. The only (in addition to all the standard technical users created by installation) user is "administrator" (should I create more?). I doubt it is correct to place public websites to /home/administrator/public_html/. What is the correct place? I am going to use Apache's Name-based Virtual Host Support to host multiple websites.

share|improve this question
up vote 5 down vote accepted

That depends a lot on what you think is good.

Personally i have two lamp's running several sites and they use the following setup:


Real life example:

<VirtualHost *:80>
    ServerAlias *

    DocumentRoot /var/www/
    <Directory />
            Options FollowSymLinks
            AllowOverride None

    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all

    ErrorLog /var/www/

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/www/ combined
    ServerSignature On

If you use this setup it might be a good idea to alter /etc/logrotate.d/apache2 just prepend lines like this "/var/www/*.log" to the file.

/var/log/apache2/*.log {
    rotate 52
    create 640 root adm
            if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/}`" ]; then
                    /etc/init.d/apache2 reload > /dev/null

This will make logrotate rotate the log-files once a week and keep a backlog of 52 times one week. This will help you avoid filling your HDD with logfiles and it helps you if you ever need something from the logfiles. I recently trawled through a 5GB postfix mail logfile... NOT FUN!

share|improve this answer

Your Answer


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.