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 installed LAMP using

sudo tasksel install lamp-server

I configured PhpStorm to use /var/www folder as root deployment folder, also specified http://localhost as web-server root url: enter image description here

When I deploy my index.html page with "helloworld" to my server - page is not found, neither is it in /var/www. Why?

share|improve this question
up vote 2 down vote accepted

This applies to Ubuntu 12.10 (may work with older versions)

First you will need to check that Apache is really using /var/www as the website root:

$ grep DocumentRoot /etc/apache2/sites-enabled/000-default
DocumentRoot <path/to/apache/root_dir>

If the path stated in the output is different, you should change that in PHPStorm.

Also you may not be able to place your php files there because the permissions on that folder. To solve this, jst change the permission of /var/www (or the correct path) to your current user:

sudo chown -R <user>:<user> /var/www

where <user> is your username.

share|improve this answer
Awesome! That worked mate =) But why is folder "read-only" by default? And why none PhpStorm guides tell it? – Chelios Nov 18 '12 at 18:35
The problem is that the folder belongs to the Apache user account (LAMP), so your user could not write to it. This is normal in a production environment, but in a development environment there are no problems if the ownership is changed. – Salem Nov 18 '12 at 18:48

try going to "mapping" and set the mapping options

share|improve this answer
Failed to transfer file '/home/chelios/PhpstormProjects/Hosting/index.html': could not write to "file:///var/www/index.html". – Chelios Nov 17 '12 at 14:10

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.