dear all, i am having problems with setting up a virtual host (Aptana Project directory) on a LAMP installation on ubuntu 11 (via tasksel).

i can access /var/www via htp://localhost, but accessing /home/tg/Aptana... via htp://ea-dev returns an "You don't have permission to access / on this server."

this is my apache2.conf: http://pastebin.com/Yja02tnE this is my ea-dev located in /etc/apache2/sites-available/: http://pastebin.com/U1Vu2jxD

thats what i get in the error.log: [crit] [client] (13)Permission denied: /home/tg/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

I really dont understand why its written /home/tg and not /home/tg/Aptana... but maybe its just an abbreviation.

also, when i restart apache, i get the following: [Fri Jun 03 15:58:19 2011] [warn] NameVirtualHost *:80 has no VirtualHosts

  • and this is my default located in /etc/apache2/sites-available/: pastebin.com/Ayv9dPRk
    – Timo
    Commented Jun 3, 2011 at 14:11

2 Answers 2


If don't need to use any .htaccess file, try to change from

AllowOverride All


AllowOverride None

in the <Directory> section

Anyway, the www-data user needs read permissions in all directories in the path'home/tg/Aptana Studio 3 Workspace/ea-dev'

This should help.

sudo chmod o+rx '/home'
sudo chmod o+rx '/home/tg'
sudo chmod o+rx '/home/tg/Aptana Studio 3 Workspace'
sudo chmod o+rx '/home/tg/Aptana Studio 3 Workspace/ea-dev'
  • I need the .htaccess since it configures mod_rewrite. Anyway, your second suggestion worked, and the CakePHP configuration site now appears. Nonetheless it tells me now that /home/tg/Aptana Studio 3 Workspace/ea-dev/app/tmp/cache/ and other directories are not writable. The owner and group of the files are all tg, and I do not understand whats the name of the Apache user that should actually access the files.. And what happens when I edit the files in Aptana?
    – Timo
    Commented Jun 3, 2011 at 15:24
  • @Timo May be, you had changed your umask? Check it executing umask, it should be 0022. A quick workaround: sudo chmod -R o+rx '/home/tg/Aptana Studio 3 Workspace/ea-dev'.
    – erickzetta
    Commented Jun 3, 2011 at 15:31
  • Yes, umask equals 0022, but executing recursive chmod does not change anything. The directories are still not writable. I think I lack understanding of users and groups in this case. I mean, tg, thats me. But I do not know what user actually access the file when somebody browses the files in the browser. Is it www-data and if yes, should I add tg to the www-data group or www-data to the tg group? :) See I am kinda confused here. After all I need to know whether a certain user, group or others need write access.
    – Timo
    Commented Jun 3, 2011 at 15:38
  • Apache in ubuntu runs as www-data user, and all PHP is executed under this user either. Usually PHP only needs to read files, but some frameworks like CakePHP write in some places like temporary folders, or cache folders. Try to add write permissions to the temporary folder (and following folders CakePHP complains): chmod -R o+w '/home/tg/Aptana Studio 3 Workspace/ea-dev/app/tmp'
    – erickzetta
    Commented Jun 3, 2011 at 15:46
  • So I need to change all those files' owner to www-data or can I leave it to tg and just consider www-data as "others"?
    – Timo
    Commented Jun 3, 2011 at 15:48

you need to link your vhost to sites-enabled

or just use: a2ensite yourVhostFile

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .