Announcement

Collapse
No announcement yet.

Apache NOT LAMP - change root folder

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Apache NOT LAMP - change root folder

    OK - I give up - another two hours searching.
    Apache works - brings up the normal page with links to apache-2 default and phpmyadmin

    I want it to home in on ~/www

    I have changed everything, created alias' - what is the one simply line to change please and where is it?
    AND - as I will have my own index page in user/www/ linking to the various web sites (folders) under it how do I link back to phpmyadmin so that mysql will work?

    ta.


    #2
    Re: Apache NOT LAMP - change root folder

    hi,

    You should add the value of DocumentRoot in the /etc/apache2/httpd.conf file :
    DocumentRoot "/home/<your_login>/www"

    Then restart apache2

    Hope it helps

    Comment


      #3
      Re: Apache NOT LAMP - change root folder

      I'll try that - but my http.conf file is empty other than this:
      # This is here for backwards compatability reasons and to support
      # installing 3rd party modules directly via apxs2, rather than
      # through the /etc/apache2/mods-{available,enabled} mechanism.
      #
      #LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so


      making me think there was another answer nowadays?

      Comment


        #4
        Re: Apache NOT LAMP - change root folder

        Under Ubuntu (at least) the configuration file is /etc/apache2/apache2.conf.

        Just a thought, but it's usually standard practice to have the web server directories somewhere under /var (I have it set up under /var/www, with localhost aliases - 127.0.0.2 etc - pointing to subdirectories therein.

        I think there's an option somewhere if you want it to access user webspace (/home/user/public_html) as http://somehost/~user, but I can't tell you what that would be...

        Comment


          #5
          Re: Apache NOT LAMP - change root folder

          Yes, exactly, from version 2 of apache the conf is in the apache2.conf.
          But if you look into this file, it's including content of httpd.conf.
          On apache website, you can find that the apache2.conf shouldn't be touched, and all configuration you would like to do should be done in httpd.conf

          Hope it helps

          Comment


            #6
            Re: Apache NOT LAMP - change root folder

            Originally posted by sky
            On apache website, you can find that the apache2.conf shouldn't be touched, and all configuration you would like to do should be done in httpd.conf
            Oops...

            Comment


              #7
              Re: Apache NOT LAMP - change root folder

              Nevermind, by the way I'm not sure that all changes can be done from the httpd.conf, so tuning a little apache2.conf shouldn't hurt

              Cheers

              Comment


                #8
                Re: Apache NOT LAMP - change root folder

                In the end I added the usr directory in etc/apache2/sites-enabled/
                Goodness knows if this is right or wrong - but it's the only file where it made any difference and actually worked! Even uncommenting and putting it in apache2.conf made no difference which seems odd.

                You are told to add 127.0.0.1 usr/www
                or whatever
                in etc/hosts
                but that actually made no difference either!

                Thanks all!!

                Comment

                Working...
                X