Results 1 to 5 of 5

Thread: Serving apache from home...?

  1. #1
    Join Date
    Aug 2005
    Beans
    432

    Serving apache from home...?

    What's the easiest way to do this?

    I could enable user_dir on apache. But i want to be able to control the directory path.

    I need to create a symlink from somewhere to somewhere?

    Can't find the answer anywhere...

    Maybe /var/www/mysite to /etc/apache2/sites-enabled?

    can someone help me out here?
    I wish my computer would do what I want it to do - not what I tell it to do.

  2. #2
    Join Date
    May 2010
    Beans
    1,894

    Re: Serving apache from home...?

    If the data is in your home folder you will need to make sure that the apache user has at least read access to the data, could get messy

  3. #3
    Join Date
    Aug 2005
    Beans
    432

    Re: Serving apache from home...?

    What's the best way to integrate localhost with local git then?

    Maybe move the git repo to /var/www/ ?

  4. #4
    Join Date
    Dec 2014
    Beans
    1,876

    Re: Serving apache from home...?

    '/etc/apache2/sites-enabled/' is a directory full of symbolic links to configuration files stored in '/etc/apache2/sites-available/'. So you basically create a configuration for your site in sites-available and activate it by linking it into sites-enabled. You normally use a2ensite to do this linking.

    You can give a different name for the directory to be used for the userdir in /etc/apache2/mod-available/userdir.conf by replacing 'public_html' with a directory name of your choice (remember to change both occurrences, the one after UserDir (line 2 on my system) and the one in the Directory line (line 5 ...).

    The configuration language for apache is very expressive but also quite complex. I urge you to try to read the documentation at http://httpd.apache.org/docs/2.4/ .

    Holger
    Last edited by Holger_Gehrke; September 21st, 2021 at 01:30 PM.

  5. #5
    Join Date
    Oct 2017
    Location
    City of Waterfalls-Ph
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Serving apache from home...?

    Quote Originally Posted by dbee View Post
    What's the easiest way to do this?
    I could enable user_dir on apache. But i want to be able to control the directory path.
    I need to create a symlink from somewhere to somewhere?
    Can't find the answer anywhere...

    Maybe /var/www/mysite to /etc/apache2/sites-enabled?

    can someone help me out here?
    I don't really get you but if you where about to change location
    you should declare it to your configuration:
    ex.

    location /{
    root /etc/apache2/sites
    index index.html
    }

    this should be in the server side configurations.
    corn ubuntuforums community.
    Open Source platform where the real world of human is here. Click here for Solve thread
    Rock n' Roll People.
    From: mike_08

Tags for this Thread

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
  •