Home Forums OS X Server and Client Discussion Web Accessing User Sites folder via Webserver

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #376088
    techdir
    Participant

    I am running 10.5.6 Server with Web services working, in a multi server AD / OD environment. The web server is bound to both AD & OD. I have a working url of http://www.server.tld I am able to access http://www.server.tld/~localadminaccount and any other account that I create in the local database and has a home folder in /Users on the local machine. This particular server is also running as a afp file server with automount setup for home folder use on a seperate volume of /Volumes/data/ with several sub-folders such as instructors, students, etc.

    When trying to access a student site for example http://www.server.tld/~18student, I am receiving a 404 error. I know that everything is working properly because http://www.server.tld resolves to the main OS X server page without error and http://www.server.tld/~localadminaccount resolves to the personal web sharing index.html file without error.

    My question is, it appears to either be a pathing issue or a problem with the user accounts not being on the local system volume. Would anyone be able to assist me in finding a solution to this.

    I want to be able to use the personal web sharing capabilities that appear to work if the user is local with a home folder in /Users on the system partition. However my users are spread into a significant folder structure on a seperate volume. For example: Our students are all located on this particular server in /Volumes/data/students//

    It is frustrating me as I know it can’t be this difficult, and I am just missing something somewhere…obviously!

    Thanks!

    #376188
    torona318
    Participant

    Make sure your user volumes on that server is setup as an automount and afp guest access is enabled and it should work.

    #376514
    scorpioserve
    Participant

    As far as I am aware the 404 error is due to permissions, I think that you might need to add some code into your apache httpd.conf file something like this.
    Ok so first the file can be found in your /etc/apache/ directory, the code you are looking for should look something like this.

    [code]
    #
    # Possible values for the Options directive are “None”, “All”,
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that “MultiViews” must be named *explicitly* — “Options All”
    # doesn’t give it to you.
    #
    # The Options directive is both complicated and important. Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks MultiViews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be “All”, “None”, or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

    [/code]

    so now what you do is just copy all that code and paste it just below itself like this
    [code]
    #
    # Possible values for the Options directive are “None”, “All”,
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that “MultiViews” must be named *explicitly* — “Options All”
    # doesn’t give it to you.
    #
    # The Options directive is both complicated and important. Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks MultiViews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be “All”, “None”, or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all


    />
    #
    # Possible values for the Options directive are “None”, “All”,
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that “MultiViews” must be named *explicitly* — “Options All”
    # doesn’t give it to you.
    #
    # The Options directive is both complicated and important. Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks MultiViews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be “All”, “None”, or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

    [/code]

    If this still does not work then you may need to also edit the httpd-vhosts.conf file located in the /etc/apache/extra/ directory, and do something like this.
    [code]#
    # ServerAdmin [email protected]
    # DocumentRoot “/usr/docs/dummy-host2.example.com”
    # ServerName dummy-host2.example.com
    # ErrorLog “/private/var/log/apache2/dummy-host2.example.com-error_log”
    # CustomLog “/private/var/log/apache2/dummy-host2.example.com-access_log” common
    #
    [/code]

    Just alter the data to suit your needs and uncomment the lines.

    The thing I find strange about this, is that I would do hacks like this on a os x client system as I have no other way, but on an os x server 10.5 system with the use of the ServerAdmin application, all this should be avoided, anyway it might be a good test to do, you can always make copies of the files you are about to edit before and just see if it works.
    [code]sudo cp -R /etc/apache2/httpd.conf /etc/apache2/httpd.conf.backup
    sudo cp -R /etc/apache2/extra/httpd-vhosts.conf /etc/apache2/extra/httpd-vhosts.conf.backup[/code]Then go and edit the original files, with a plain text editor, or bbedit or textwrangler, or if all else fails pico or nano there are a couple of choices.

    It should now work, but i am not certain, the only other alternative I can think of might be to add a .htaccess file into the directory you want access to, If all this fails let me know and I will give you the code for that, it is somewhere on my computer, but I do not think you will need to do something as drastic as that unless you wanted to add some redirects or something.

    Hope this helps.

    Sorry one last thing I forgot to mention is that after editing these files you need to restart apache to see if the changes worked, either through terminal, or though the websharing pref on a client sys, or ServerAdmin stop:start the web service on a Server sys.

    #376515
    scorpioserve
    Participant

    Sorry one last thing I forgot to mention is that, and correct me if I am wrong but I thik that the ~ tilda symbol on os X is like an alias pointing to a specific folder, so I would rater use absolute paths for this lot, just incase. 😉

    #376581
    Dean_Shavit
    Participant

    [QUOTE][u]Quote by: scorpioserve[/u][p]Sorry one last thing I forgot to mention is that, and correct me if I am wrong but I thik that the ~ tilda symbol on os X is like an alias pointing to a specific folder, so I would rater use absolute paths for this lot, just incase. 😉 [/p][/QUOTE]

    the tilde (not Tilda like the famous actress) is actually a shortcut to the current user’s home directory.

    #376744
    khiltd
    Participant
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Comments are closed