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 had my LAMP server crushed for some reason. That's why I've completely removed it and installed once again. Installation was successful and "localhost" is working fine. However every time I'm trying to add a virtual host (using a2ensite command) my apache2 server stop working. When I run a2dissite command of a corresponding virtual host, the server start working again. Please, help me to solve this issue.

share|improve this question
Post (pastebin) the entire configuration of your problematic vitrualhost. – bodhi.zazen Dec 8 '11 at 2:29
This is my virtual host configuration: <VirtualHost *:80> ServerAdmin ServerName myhost ServerAlias www.myhost DocumentRoot /home/stas/projects/myhost ErrorLog /home/stas/projects/myhost/logs/error.log CustomLog /home/stas/projects/myhost/logs/access.log combined <Directory /home/stas/projects/myhost/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> – Stas Dec 8 '11 at 19:53
I do not see anything obvious. What are the permissions on the /home/stats/projects/* directories and files ? Do the log files exist? What is in your logs? – bodhi.zazen Dec 8 '11 at 20:10

As of for subdomains 000-default use:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /home/username/public_html/example
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        <Directory /home/username/public_html/example>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all

        ErrorLog ${APACHE_LOG_DIR}/error.log

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

        CustomLog ${APACHE_LOG_DIR}/access.log combined

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.