LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-06-2008, 10:09 AM   #1
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Rep: Reputation: 15
Hosting webpages on localhost


We've got a fileserver (Hardy) at our university, serving Hardy clients (Laptops & Desktops), with a handful of Windows clients here and there. I need to set up the following things for students, professors and other staff.

I want these individuals to each have their own limited webspace on our fileserver. That is, when you're on our Intranet and you type http://<ip_of_fileserver>/<username> into your broswer, it should take you to the index.html of their personal web directory, which I assume must be a subdirectory in /var/www/ on our fileserver.

How do I set this up? Do I create a pub directory under each user's home directory? Or is it simply a matter of creating directories for each user under /var/www/?

What I want is for these directories to be the same as their usernames. I want the owners of these directories to have to upload their pages with ftp, for example. I need them to log in with the same username and password they use for logging into the Hardy workstations at the lab. This way, I won't have UserA mucking about in the web directory of UserB.

It's a Sunday afternoon, and I'm wondering what's the quickest way of getting this set up before tomorrow?

Thank you
 
Old 07-06-2008, 10:20 AM   #2
LordAnta
Member
 
Registered: Apr 2008
Location: Munich, Germany
Distribution: Slackware current
Posts: 128

Rep: Reputation: 18
in your httpd.conf (or apache2.conf) enter this:

Code:
 # Settings for user home directories
#
# Required module: mod_userdir

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.  Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir public_html

#
# 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 Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
Now, you can acces a users page:
Code:
 http://<ip_of_fileserver>/~<username>
Hope it helps!
 
Old 07-06-2008, 12:05 PM   #3
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Original Poster
Rep: Reputation: 15
cool, thanks! that worked! but the fileserver is not accepting ftp connections :-(
 
Old 07-06-2008, 12:15 PM   #4
LordAnta
Member
 
Registered: Apr 2008
Location: Munich, Germany
Distribution: Slackware current
Posts: 128

Rep: Reputation: 18
Well, start a FTP daemon so it can accept ftp connections.
But why don't you use scp? (at my college we used WinScp for windows and scp and gftp for linux to transfer files )
 
Old 07-07-2008, 08:42 AM   #5
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by LordAnta View Post
Well, start a FTP daemon so it can accept ftp connections.
But why don't you use scp? (at my college we used WinScp for windows and scp and gftp for linux to transfer files )
that worked, thanks! :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cheap hosting v hosting on my home machine rblampain Linux - Security 4 09-22-2007 12:11 AM
apache : localhost/ works localhost/index.html does not PhilA Linux - Server 4 05-27-2007 07:32 PM
LXer: Web Hosting Provider Verizon Business Expands Managed Hosting ... LXer Syndicated Linux News 0 09-17-2006 06:21 AM
LXer: Web Hosting Provider Zen Internet Offer Linux Hosting Trial for 1 ... LXer Syndicated Linux News 0 04-20-2006 09:33 PM
Message from syslogd@localhost localhost kernel: Disabling IRQ #21 ylts Linux - Hardware 0 02-26-2005 08:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration