Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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/symfony2-tries.com file with following content:

# domain: symfony2-tries.com
# public: /home/junda/www/symfony2-tries.com/

<VirtualHost *:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin webmaster@symfony2-tries.com
  ServerName  www.symfony2-tries.com
  ServerAlias symfony2-tries.com


  # 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

</VirtualHost>

after that i tried to enable it using a2ensite.

sudo a2ensite symfony2-tries

but it returns:

ERROR: Site symfony2-tries.com 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
add comment

1 Answer

up vote 8 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
add comment

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.