LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   other users' websites (~username) (https://www.linuxquestions.org/questions/linux-networking-3/other-users-websites-%7Eusername-270357/)

stlshawn 12-25-2004 10:30 PM

other users' websites (~username)
 
Sorry if this seems a bit of a silly question, but i'm really at a loss.

I changed my default webserver, and thanks to some help of the people here, it works! woo hoo,,,, yeah!!

Anyway, naturally, i want to go a bit further.

I'm trying to make it so i can create files as other users.
Currently, i have a user called "webmaster", who's home directory is also the apache default wich is now, /home/webmaster/www/public_html .

now i'm trying to setup another user who could be accessed at xxxxx/~shawn

So, i added user shawn via adduser shawn
created /www/public_html under /home/shawn .

when i ftp into the server, logged in as shawn, it lets me get into all the directories, but when i try to use xxxxx/~shawn i get 404 error.

where should i be looking to fix this?


the five x's are for my server's ip wich i cannot type since i have not yet posted five times.
thanks everyone...
Shawn

jacks4u 12-26-2004 01:48 AM

/etc/apache/httpd.conf has the settings you are looking for - speciffically the <VirtualHost> or <Location> sections, where you can tell Apache aboutlocations it is supposed to serve other than the webroot.

you should rad up on the httpd.conf file and the things it allows you to do - http://httpd.apache.org/docs-project/ - has the documentation for several recent releases of apache

but something like:

Code:


Alias /~shawn/ /home/shawn/www/public-html/
<Location /~shawn >
  order allow,deny
  allow from all
  Options Indexes FollowSymLinks MultiViews
</Location>

might do the trick - but caution is needed as there are several security issues with doing it this way.

Read the online doccumentation, and adjust httpd.conf to suit your needs

jacks4u

XavierP 12-26-2004 04:15 AM

Moved: This thread is more suitable in Linux-Networking and has been moved accordingly to help your thread/question get the exposure it deserves.

fax8 12-26-2004 04:23 AM

Hi

I think that the best way to add user home webspace is to use mod_userdir.
to enable this put this code on your httpd.conf .

This will enable web sharing of www/public_html directory for every user below /home

Code:

#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
    UserDir www/public_html
</IfModule>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/www/public_html>
    AllowOverride FileInfo AuthConfig Limit
    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>

Hope to be useful!

Fabio Italy

stlshawn 12-26-2004 08:42 AM

Thanks so much
 
I'm constantly amazed at how wonderful the people
of this forum are.
I was bedazzled enough by the help at the vector
linux forum, and how helpful they were, especially
after hearing all the misinformation on how elitist
the linux community was. Now i know that the linux
users are the cream of the crop in technical skills, and
in their wish to help others use this wonderful operating
system.

I'll try these answers tonight, and thanks so much for the
info.

Be Happy Always!
Shawn


All times are GMT -5. The time now is 11:16 PM.