Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Apache2 refuses to follow symlinks to homedir

  1. #1
    Join Date
    Apr 2007
    Beans
    33

    Apache2 refuses to follow symlinks to homedir [Now completely broken]

    I have just wasted one hour trying to get apache2 to show the files that I have in a folder inside my homedir. I am not using the server edition btw, plain regular 7.10 Desktop, 32bit.

    I have tried everything:
    - setting the document root to be the folder in homedir as well as leaving it at /var/www
    - generously setting "FollowSymlinks" options for all Directories in the default host
    - applying 755 permissions to the folder and its contents
    - added .htaccess file in /var/www specifying "Options +FollowSymlinks"
    - set "AllowOverride All" or all Directories in the default host

    It just won't work. I refuse to copy my web development projects to the stupid /var/www folder - which is not part of the /home/partition and thus requires extra backup measures.

    What can I do to make it work?
    Last edited by randomstuff; May 25th, 2008 at 04:44 PM.
    Thank you for your time!

  2. #2
    Join Date
    Dec 2005
    Beans
    25

    Re: Apache2 refuses to follow symlinks to homedir

    I have my home directory on a raid1 partition, and var mounted on a non raid partition, so I also did not want to put my http docs in /var/www. /var is for logs and other things I never look at.

    the only things i changed in /etc/apache2/site-available/default were:

    DocumentRoot /home/john/Working/pub_html/

    <Directory /home/john/Working/pub_html/>

    and it works fine for me. Shouldn't have to add a .htaccess anywhere. thats just crazy.

    oh yeah and don't forget to restart Apache.
    Last edited by floydwilde; May 25th, 2008 at 12:02 PM. Reason: forgot something

  3. #3
    Join Date
    Apr 2007
    Beans
    33

    Re: Apache2 refuses to follow symlinks to homedir

    It still won't work. I keep getting 403 error messages, even though everybody has permissions to read the directory.
    Thank you for your time!

  4. #4
    Join Date
    Apr 2007
    Beans
    33

    Re: Apache2 refuses to follow symlinks to homedir

    Ok, I don't know what's wrong with my system, but now it's completely screwed up.

    Even after selecting all "apache2" packages in synaptic, selecting "remove completely" and then reinstalling, I cannot even get the default /var/www/ directory to work any more. (error log says: "[Sun May 25 17:39:10 2008] [error] [client 127.0.0.1] File does not exist: /htdocs")

    I have also tried configuring apache through webmin, but it seems to do no better than me.

    Trying to get the userdir mod to work has also failed in all attempts, using webmin, a2enmod, manually symlinking - nothing works.

    Could this be related to group/user permissions? what can I possibly do to get my webserver up and running? It's not really supposed to be *this* hard, is it?
    Last edited by randomstuff; May 25th, 2008 at 04:47 PM.
    Thank you for your time!

  5. #5
    Join Date
    Jan 2006
    Location
    United Kingdom
    Beans
    2,787
    Distro
    Kubuntu 6.06 Dapper

    Re: Apache2 refuses to follow symlinks to homedir

    Post your config then we can take a look.

    Mathew
    www.NewtonNet.co.uk - Now supporting IPv6!

    ~ Please don't use PM's to request assistance - post your query on the forum and share the discussion - if you've got a problem chances are you won't be the only one! ~

  6. #6
    Join Date
    Apr 2007
    Beans
    33

    Re: Apache2 refuses to follow symlinks to homedir

    I have uploaded most of my /etc/apache2/ directory contents to my webserver.

    I doubt it'll help much though, since I have reinstalled several times and tried many things, without any luck.

    so I suspect the problem must be more general to my system. I just have no idea where to look.

    Thank you for trying to help though.
    Thank you for your time!

  7. #7
    Join Date
    Jan 2006
    Location
    United Kingdom
    Beans
    2,787
    Distro
    Kubuntu 6.06 Dapper

    Re: Apache2 refuses to follow symlinks to homedir

    Your config is a little confusing given you've got multiple webmin-created sites however given that sites-enabled/000-default is empty we'll concentrate on the only other enabled site - sites-enabled/webmin.1211729846.conf:

    Code:
    <VirtualHost *>
    DocumentRoot /var/www/apache2-default
    <Directory "/var/www/apache2-default">
    allow from all
    Options +Indexes
    </Directory>
    UserDir "public_html"
    </VirtualHost>
    Change DocumentRoot to the directory in the home directory you want to serve, and edit the <Directory> directive to suit. Then make this web directory, and all parent directories, have read/execute permissions for Apache (user 'www-data') and see how you go...

    Mathew
    www.NewtonNet.co.uk - Now supporting IPv6!

    ~ Please don't use PM's to request assistance - post your query on the forum and share the discussion - if you've got a problem chances are you won't be the only one! ~

  8. #8
    Join Date
    Jan 2008
    Beans
    1

    Re: Apache2 refuses to follow symlinks to homedir

    I was having a problem that sounded quite similar (I found this thread searching for a fix). It turned out one of the parent directories of what I was trying to ask Apache to open had slightly barring permissions. Frustratingly simple problem after all the irritation it caused.

    Cheers.

  9. #9
    Join Date
    Sep 2007
    Beans
    251

    Re: Apache2 refuses to follow symlinks to homedir

    I had this similar problem. Create a "htdocs" folder in /. You can make it a link to any folder you like. Put your website in htdocs or in the dir that htdocs points to. This is what I had to do to get my website up. I figuered it out by reading the /var/logs/apache2/error log. It is weird and I am trying to figure it out right now.

  10. #10
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Apache2 refuses to follow symlinks to homedir

    FYI, Apache 1.3 uses a default document root of /var/www/htdocs. This is probably what you were seeing.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

Page 1 of 2 12 LastLast

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
  •