Home › Forums › OS X Server and Client Discussion › Web › Accessing User Sites folder via Webserver
- This topic has 5 replies, 5 voices, and was last updated 15 years, 8 months ago by
khiltd.
-
AuthorPosts
-
April 29, 2009 at 7:04 am #376088
techdir
ParticipantI 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!
May 15, 2009 at 10:38 pm #376188torona318
ParticipantMake sure your user volumes on that server is setup as an automount and afp guest access is enabled and it should work.
June 26, 2009 at 10:09 pm #376514scorpioserve
ParticipantAs 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]# [/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
#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.
June 26, 2009 at 10:12 pm #376515scorpioserve
ParticipantSorry 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. 😉
July 9, 2009 at 5:02 am #376581Dean_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.
July 29, 2009 at 7:32 pm #376744 -
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed