[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: httpd.conf in sarge



Wäre es nicht einfach die dafür verantwortliche Einstellung inder httpd.conf von public_html auf pub zu ändern und danach ein apache relaod auszuführen?
Verantwortlich dafür ist mod_userdir...

Siehe auch den beigefügten cofnfig file excerpt.


wastl

Florian Reitmeir wrote:
On Mon, 16 Jän 2006, RalfGesellensetter wrote:

Am Montag 16 Januar 2006 16:53 schrieb bgrah:
      -------Meine Schüler haben alle ihre index.html direkt in pub
      liegen.-------
Bedeutet dies nicht, dass ALLE Dateien aller schüler über den Apache erreichbar sind? Möglicherweise ist diese Einstellung aus Gründen des Persönlichkeitsrechts nicht möglich. Was hältst du davon, die Indexdateien nach public_html oder www zu verschieben?
cd /skole/tjener/home0
for D in `ls -d1 *` ; do mkdir $D/www ; done
for D in `ls -d1 *` ; do mv $D/index.html $D/www/index.html ; done

soweit ich verstanden habe, ist der einzige Unterschied bei Ihm, dass das
Verzeichnis 'pub' und nicht 'public_html' heisst..

also ein

for user_dir in `ls -1 *` ; do mkdir $user_dir/pub ; done
set -e
cd /skole/tjener/home0
for user_dir in `ls -1 *` ; do mv $user_dir/pub $user_dir/public_html ; done

also root.. sollte die Gegebenheit anpassen.


#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#

<IfModule mod_userdir.c>
	# Note that the name of the user directory ("public_html") cannot easily be
	# changed here, since it is a compile time setting. The apache package
	# would have to be rebuilt. You could work around by deleting
	# /usr/sbin/suexec, but then all scripts from the directories would be
	# executed with the UID of the webserver.
	# 
	# To rebuild apache with another setting you need to change the 
	# %userdir define in the spec file. 

	# not every user's directory should be visible:
	UserDir disabled root

	# to enable UserDir only for a certain set of users, use this instead:
	#UserDir disabled
	#UserDir enabled user1 user2


	# the UserDir directive is actually used inside the virtual hosts, to 
	# have more control
	#UserDir public_html

	<Directory /home/*/public_html>

		AllowOverride FileInfo AuthConfig Limit Indexes
		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>

</IfModule>

Reply to: