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 am a total newbie and has seen lots of tutorials on the net but still can't solve my problems.

I installed LAMP+PHPMyAdmin the following way: sudo apt-get install lamp-server^ phpmyadmin

Here are my issues: 1) I need to change my document root. I need to set it to /data/WWW. I tried the "ln" function, it creates a shortcut but when I access http://localhost it gives me 403 error. I believe there is some permissions issue but have no idea how to solve it. Please help! 2) Trying to access phpmyadmin via http://localhost/phpmyadmin does not work. How do I access it? Do I have to create some link to it?

Any help is very appreciated!

share|improve this question
    
Maybe not a duplicate but this is the best Q&A to follow. –  Tom Brossman Oct 17 '12 at 19:23

2 Answers 2

you can change the default document root in

/etc/apache2/sites-available/default

Apache is mostly configure files. by changing settings in the .conf, you can achieve almost anything.

open a terminal and type:

sudo nano /etc/apache2/sites-available/default*

your file should start like:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />

change Document root to wherever you want, and press Crtl+X to save and exit.

then reload apache with:

sudo /etc/init.d/apache2 restart
share|improve this answer

I following article I write about moving your document root to your home directory. The same procedure applies when moving it anywhere else:

http://www.techytalk.info/ubuntu-netbeans-lamp-with-xdebug-nonroot/

The only thing you should watch out for is to make sure new document root is writable by www-data user from www-data group.

share|improve this answer
    
The chown and chmod commands worked like a charm! How can I access the phpmyadmin now? –  barakuda28 Oct 17 '12 at 18:45

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.