Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm new to Linux, and only use it for surfing web until recently.

For everyone to know, I had developed a website complete with its database using WampServer on windows. And I created the all the pages using adobe dreamweaver. The site had been working perfectly.

Recently, I installed ubuntu 12.04 on my machine (dual boot with the prior windows) together with LAMP server, and I was intending to transfer my whole website pages and databases to the ubuntu platform. The LAMP server seems to be working fine.

After that I copied all the .php website files from WampServer to LAMP in the directory /var/www But when I tried to view the page through mozilla browser, it only showed blank white page, although the url showed the correct address.

Why was this happen? Did I do anything wrong during LAMP installation? The site was designed with css style, would this contribute to the problem?

share|improve this question

2 Answers 2

Have you given www-data an access to the files you copied in /var/www/?

$ sudo chmod -R 755 /var/www/Your_Site/

or you let www-data own your site folder

$ sudo chown -R www-data /var/www/Your_Site/

share|improve this answer
    
I put the index.php file and all other files under the /var/www/ directory, do I need to sudo chmod -R 755 each .php file? –  realfalah May 14 '12 at 8:09
    
Giving 755 permission for everything is not good. there is a big security issue :) –  Achu May 14 '12 at 8:11
    
@realfalah No!! for php configuration files you should give 644 sudo chmod -R 644 each .php –  Achu May 14 '12 at 8:12
    
No you don't have to do that in every file. -R already do that recursively. So all files under your directory will be set with 755 permission. –  Barz May 14 '12 at 8:15
    
Thak you everyone! It worked! –  realfalah May 14 '12 at 8:21

I see blank white page when the directory permission is wrong.

You should set directory permission to 777 and for files 644

So,

Direcotys sudo chmod -R 775 /var/www/<Your_project_name>

php files sudo chmod -R 644 /var/www/<Your_project_name>

share|improve this answer

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.