Results 1 to 10 of 10

Thread: var/www to home/user/public_html

  1. #1
    Join Date
    Jun 2011
    Beans
    87
    Distro
    Ubuntu 12.04 Precise Pangolin

    var/www to home/user/public_html

    i have one more problem
    i dont know how to configure apache so it would work from /home/user/public_html i tryed virtualhost but i think that i do something wrong.
    if you can send any guide for this i will be very gratefull.

  2. #2
    Join Date
    Aug 2006
    Location
    Michigan
    Beans
    392
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: var/www to home/user/public_html

    So, if you still haven't changed much with your apache2 install this should be able to help:
    1. Go to /etc/apache2/sites-enabled
    2. Check to make sure that the 'default' site config is there
    3. Edit the 'default' site config (vim ./000-default)
    4. Look for DocumentRoot and change the location to where you would like it to be
    5. Save document and restart service
    6. Make sure the new location can be accessed by the user/group www-data (or to the user that owns the apache service)


    The 'DocumentRoot' helps define the location for a certain VirtualHost: http://httpd.apache.org/docs/2.0/mod...l#documentroot

    Cheers!
    ThisIsBryan: The Site | About Me
    HowTo: Setup Ubuntu Desktop with LVM Partitions WIKI
    Hardware Profile: Dell XPS 14z; 4GB DDR3 RAM; 700GB HD; Intel Corporation Centrino Advanced-N 6230; Intel i7 CPU @ 2.80 GHz

  3. #3
    Join Date
    Apr 2009
    Location
    Surrey, London
    Beans
    291
    Distro
    Ubuntu

    Re: var/www to home/user/public_html

    or you could use a symlink ?
    Ubuntu 18.04 VMs

  4. #4
    Join Date
    Mar 2007
    Location
    Wenatchee, WA
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: var/www to home/user/public_html

    http://kimbriggs.com/computers/compu...rectories.file

    If you need PHP to work, pay particular attention to the link towards the end about enabling PHP for user public_html directories... it is not enabled by default.

  5. #5
    Join Date
    Jun 2011
    Beans
    87
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: var/www to home/user/public_html

    Quote Originally Posted by memilanuk View Post
    http://kimbriggs.com/computers/compu...rectories.file

    If you need PHP to work, pay particular attention to the link towards the end about enabling PHP for user public_html directories... it is not enabled by default.
    Thank your very much it was what i needed. furrEdgz thank you too,

  6. #6
    Join Date
    Jan 2005
    Location
    Israel
    Beans
    75

    Re: var/www to home/user/public_html

    Consider enabling userdir module.
    Currently it works for me except for cgi-bin.
    See UbuntuForums Configure Apache to enable cgi-bin user directories.

  7. #7
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    mod_userdir

    As mentioned by yotam, mod_userdir may be what you want. It is very easy to set up.

  8. #8
    Join Date
    Jun 2011
    Beans
    87
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: var/www to home/user/public_html

    my server now work like i wanted it to work 192.168.1.18/~mysite/ but i have another problem, my php scripts doesnt run. it directly download my index.php file dont open the site.

  9. #9
    Join Date
    Jan 2010
    Location
    Australia
    Beans
    544
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: var/www to home/user/public_html

    Edit /etc/apache2/mods-available/php5.conf and comment the line that says "php_admin_value engine Off". Save and restart Apache.

  10. #10
    Join Date
    Jun 2011
    Beans
    87
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: var/www to home/user/public_html

    Quote Originally Posted by Ryan Dwyer View Post
    Edit /etc/apache2/mods-available/php5.conf and comment the line that says "php_admin_value engine Off". Save and restart Apache.
    there is no php5.conf file in /etc/apache2/mods-available folder. :S
    -----------------------------------------------
    i had run a2enmod and file was come. after that i had comment php_admin_value engine off in php5.conf and when i restart apache2 it was working.
    Thanks a lot.
    Last edited by mandza; June 27th, 2011 at 04:01 PM. Reason: problem solved
    Security - a Journey not a Destination

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
  •