Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Howdy, I'm running Apache 1.3 on my SuSE 8.0 machine. Only thing I can seem to get working is the default /usr/local/httpd/htdocs directory. I cannot get the user public_html directories ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2003
    Posts
    5

    Apache User Directories (public_html)


    Howdy,

    I'm running Apache 1.3 on my SuSE 8.0 machine. Only thing I can seem to get working is the default /usr/local/httpd/htdocs directory. I cannot get the user public_html directories to work, nor can I get the cgi-bin/ to work. (PHP and SSI's do work tho. I'm learning PHP now )

    Permissions are set. Do I need to add the users to a group of some sort?

    From the httpd.conf:
    Code:
    #
    # UserDir: The name of the directory which is appended onto a user's home
    # directory if a ~user request is received.
    
    # Note: 
    # The next three lines are commented out here. These directives and the access 
    # control section have been put into /etc/httpd/suse_public_html.conf. 
    # If the variable HTTPD_SEC_PUBLIC_HTML in /etc/sysconfig/apache 
    # is set to "yes" (default), SuSEconfig will include that file via 
    # /etc/httpd/suse_include.conf. 
    # Also note that for the /home/*/public_html directories to be browsable the 
    # executable flag must be set on the /home/* directories.
    so, HTTPD_SEC_PUBLIC_HTML is set to yes, and this is the /etc/httpd/suse_public_html.conf:

    Code:
    <Ifmodule mod_userdir.c>
    UserDir public_html
    </Ifmodule>
    
    <Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit
    Options  indexes  includesNoExec  execCGI 
    <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
    </Limit>
    Allow from all
    </Directory>
    Not sure what to do. Any help would be appreciated!

    Oh yeah, the user_dir mod is set up to run

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Do you get a 403 or 404 error?

  3. #3
    Just Joined!
    Join Date
    Jun 2003
    Posts
    5

    page display

    Well, I used to be able to view the user directories locally on the server...but after messing with it so much I get "Page Not Found" on any of my computers.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    See if you get something in your error log.

  6. #5
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    Yes, post the error log and have you done a
    ScriptAlias to your cgi-bin directory? and check the permission on the cgi
    files as well, make them executable.

  7. #6
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Yo´ll find the logs under /var/log/httpd/

    Regards
    Regards

    Andutt

  8. #7
    Just Joined!
    Join Date
    Jun 2003
    Posts
    5
    Here's some log stuff for the cgi-bin/

    Code:
    &#91;Fri Jun 20 09&#58;38&#58;44 2003&#93; &#91;error&#93; &#91;client 24.166.41.248&#93; client denied by server configuration&#58; /usr/local/httpd/cgi-bin/count/count
    &#91;Fri Jun 20 09&#58;38&#58;44 2003&#93; &#91;error&#93; &#91;client 24.166.41.248&#93; client denied by server configuration&#58; /usr/local/httpd/cgi-bin/count/count
    &#91;Fri Jun 20 09&#58;38&#58;44 2003&#93; &#91;error&#93; &#91;client 24.166.41.248&#93; client denied by server configuration&#58; /usr/local/httpd/cgi-bin/count/count
    &#91;Fri Jun 20 09&#58;39&#58;00 2003&#93; &#91;error&#93; &#91;client 24.166.41.248&#93; client denied by server configuration&#58; /usr/local/httpd/cgi-bin/count/count
    &#91;Fri Jun 20 09&#58;39&#58;01 2003&#93; &#91;error&#93; &#91;client 24.166.41.248&#93; client denied by server configuration&#58; /usr/local/httpd/cgi-bin/count/count
    &#91;Fri Jun 20 09&#58;39&#58;03 2003&#93; &#91;error&#93; &#91;client 24.166.41.248&#93; client denied by server configuration&#58; /usr/local/httpd/cgi-bin/count/count
    &#91;Fri Jun 20 09&#58;39&#58;03 2003&#93; &#91;error&#93; &#91;client 24.166.41.248&#93; client denied by server configuration&#58; /usr/local/httpd/cgi-bin/count/count
    (that's my ip)
    I guess something is messed up in httpd for the cgi. (Permissions are set as they should be.)

    Quite a bit of this stuff too
    Code:
    &#91;Sat Jun 21 00&#58;44&#58;16 2003&#93; &#91;error&#93; &#91;client 24.166.15.239&#93; File does not exist&#58; /usr/local/httpd/htdocs/default.ida
    &#91;Sat Jun 21 00&#58;53&#58;29 2003&#93; &#91;error&#93; &#91;client 24.166.15.239&#93; File does not exist&#58; /usr/local/httpd/htdocs/default.ida
    and this:
    Code:
    &#91;Sat Jun 21 10&#58;51&#58;45 2003&#93; &#91;error&#93; &#91;client 24.156.47.186&#93; File does not exist&#58; /usr/local/httpd/htdocs/scripts/root.exe
    &#91;Sat Jun 21 10&#58;51&#58;54 2003&#93; &#91;error&#93; &#91;client 24.156.47.186&#93; File does not exist&#58; /usr/local/httpd/htdocs/MSADC/root.exe
    &#91;Sat Jun 21 10&#58;52&#58;01 2003&#93; &#91;error&#93; &#91;client 24.156.47.186&#93; File does not exist&#58; /usr/local/httpd/htdocs/c/winnt/system32/cmd.exe
    &#91;Sat Jun 21 10&#58;52&#58;07 2003&#93; &#91;error&#93; &#91;client 24.156.47.186&#93; File does not exist&#58; /usr/local/httpd/htdocs/d/winnt/system32/cmd.exe
    &#91;Sat Jun 21 10&#58;52&#58;14 2003&#93; &#91;error&#93; &#91;client 24.156.47.186&#93; File does not exist&#58; /usr/local/httpd/htdocs/scripts/..%5c../winnt/system32/cmd.exe
    &#91;Sat Jun 21 10&#58;52&#58;24 2003&#93; &#91;error&#93; &#91;client 24.156.47.186&#93; File does not exist&#58; /usr/local/httpd/htdocs/_vti_bin/..%5c../..%5c../..%5c../winnt/system32/cmd.exe
    actually....there's a lot of the windows paths in the log....


    But I don't see anything in the log about user directories not existing.

  9. #8
    Just Joined!
    Join Date
    Jun 2003
    Posts
    5

    http.conf

    Could someone post their/example configuration for the public_html? Maybe there's one little thing messed up with mine.

    Maybe even the entire http.conf I could use as a template?

  10. #9
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    The only relevant stuff for that in my apache config looks like this:
    Code:
    #
    # UserDir&#58; The name of the directory which is appended onto a user's home
    # directory if a ~user request is received.
    #
    <IfModule mod_userdir.c>
        UserDir public_html
    </IfModule>
    
    #
    # Control access to UserDir directories.  The following is an example
    # for a site where these directories are restricted to read-only.
    #
    <Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS PROPFIND>
            Order allow,deny
            Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS PROPFIND>
            Order deny,allow
            Deny from all
        </LimitExcept>
    </Directory>

  11. #10
    Just Joined!
    Join Date
    Jun 2003
    Posts
    5
    ok, I'm a moron, the user dir will work if there's a / at the end of the user name, SOB!! hahahahaha

    ~user/

Page 1 of 2 1 2 LastLast

Posting Permissions

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