Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have created files for my site in the /home/junda/www/ directory. I use symfony2, means the public files goes to /home/junda/www/symfony2-tries/web/ directory.

I then type this following command to the terminal to change permission:

sudo chmod -R a+rX ~/www
sudo chmod a+rx ~

I also create /etc/apache2/sites-available/ file with following content:

# domain:
# public: /home/junda/www/

<VirtualHost *:80>

  # Admin email, Server Name (domain name) and any aliases

  # Index file and Document Root (where the public files are located)
  DirectoryIndex app.php
  DocumentRoot /home/junda/www/symfony2-tries/web

  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/junda/www/symfony2-tries/log/error.log
  CustomLog /home/junda/www/symfony2-tries/log/access.log combined


after that i tried to enable it using a2ensite.

sudo a2ensite symfony2-tries

but it returns:

ERROR: Site does not exist!

Could anyone kindly told me where I did wrong? And if possible, how to correct it. Thank You very much.

share|improve this question
up vote 16 down vote accepted

I have found the solution!

All files in /etc/apache2/sites-available/ must have the .conf extension now.

Example: symfony2-tries rename it in symfony2-tries.conf

Type sudo a2ensite symfony2-tries.conf and restart apache.

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.