1

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!

2 Answers2

0

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
0

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.

Marko
  • 844