Personal tools
You are here: Home Wiki ApacheSymlink
Views

Edit history

Edit: -1 of 1
Time: 2006-09-18 17:41:36
Note: /kplug_main/wiki/LinuxAnswers/upgradeAll

changed:
-
How do we create a directory in every user's home directory where they
can drop a file, and have it automatically displayed by the Apache Web
Server running on the LTSP server?

The simple answer is to create a symlink in /etc/skel, so when you create
users on the system, it links a directory to DocumentRoot of the Web
Server. However, we discovered that, the redhat-config-user utility didn't
handle the symlink properly.

So Nandy created a work-around. He modified the .bashrc in /etc/skel like
so::

  # .bashrc
  # User specific aliases and functions
  # Source global definitions
  if [[ -f /etc/bashrc ]; then			# these
	. /etc/bashrc				# lines
  fi						# are standard
  
  if [[ ! -d /home/$USER/www ]; then		# does the link exist?
	echo creating link...			# echo to standard out
	ln -s /var/www/html /home/$USER/www	# create the symbolic link if not
  else						# otherwise
	echo www link exists...			# echo to standard out.
  fi						# done


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: