Results 1 to 7 of 7

Thread: LAMP server and Im new!

  1. #1
    Join Date
    Apr 2012
    Beans
    7

    LAMP server and Im new!

    Hi! Im new to ubuntu really! Anyways Installed ubuntu on my laptop to run a temporary webserver on it. I installed the LAMP (Linux Apache MySQL Php) server. It's all working fine, but I was trying to put my website on the server by dragging all my folders and stuff into /var/www and it said I don't have permission. Im very confused because 1. Im the only user. 2. Im the admin the one who installed it and ya...?
    Very confused any help is very much appreciated!
    (was this the right place to post...?)

  2. #2
    Join Date
    May 2010
    Location
    New Zealand
    Beans
    94
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: LAMP server and Im new!

    By default, only the root user has write access to /var/www.
    Is it possible to point lamp to read from a different directory? Much easier if you have it reading from a subfolder in your home directory

  3. #3
    Join Date
    Apr 2012
    Beans
    7

    Re: LAMP server and Im new!

    Quote Originally Posted by sundays211 View Post
    By default, only the root user has write access to /var/www.
    Is it possible to point lamp to read from a different directory? Much easier if you have it reading from a subfolder in your home directory
    Woah im brand new what does that mean? Im litterally in the file browser going to that directory.
    Edit: Ok so if I figure out how to do that it should work? Well thats just another thing to do...
    Last edited by TheNardCake; April 28th, 2012 at 04:11 AM. Reason: Understood now

  4. #4
    Join Date
    May 2010
    Location
    New Zealand
    Beans
    94
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: LAMP server and Im new!

    You can do one of two things:
    1) Change the permissions of the /var/www directory (by typing
    Code:
    sudo chmod a+w /var/www
    into the terminal)

    2) Point the server to a different directory. This you can do by editing the apache2 config file:
    Code:
    sudo gedit /etc/apache2/sites-available/default
    and changing
    Code:
    DocumentRoot /var/www
    and
    Code:
    <Directory /var/www/>
    to your desired folder name.

    for example, if you create a folder in your home directory called 'www', then you would change it to
    Code:
    /home/[your username]/www

  5. #5
    Join Date
    Apr 2012
    Beans
    7

    Re: LAMP server and Im new!

    Quote Originally Posted by sundays211 View Post
    You can do one of two things:
    1) Change the permissions of the /var/www directory (by typing
    Code:
    sudo chmod a+w /var/www
    into the terminal)

    2) Point the server to a different directory. This you can do by editing the apache2 config file:
    Code:
    sudo gedit /etc/apache2/sites-available/default
    and changing
    Code:
    DocumentRoot /var/www
    and
    Code:
    <Directory /var/www/>
    to your desired folder name.

    for example, if you create a folder in your home directory called 'www', then you would change it to
    Code:
    /home/[your username]/www
    Thank you so much!

  6. #6
    Join Date
    May 2010
    Location
    New Zealand
    Beans
    94
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: LAMP server and Im new!

    No problem, though if you have a problem in the future and you still don't know a lot about Ubuntu, you might like to try the "Absolute Beginner Talk" forum

  7. #7
    Join Date
    Apr 2006
    Location
    Fresno CA
    Beans
    2,790
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: LAMP server and Im new!

    What I do is to put links in /var/www that point to the sites stored in my /home folder. To make the links you can Alt+F2 gksudo nautilus /var/www. The folder is now opened by root so you can easily create the links.
    Thank a veteran -- George 8)
    Internet Coach & Writer
    Personal Blog -- 3 Joes' Blog

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •