Find the answer to your Linux question:
Results 1 to 5 of 5
Hello guys, I would like to ask: how do I use "user.domainname.com" instead of "domainname.com/~user"? Thanks...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    19

    Domain name problem


    Hello guys,

    I would like to ask: how do I use "user.domainname.com" instead of "domainname.com/~user"?

    Thanks

  2. #2
    Just Joined!
    Join Date
    Jun 2006
    Location
    (.)
    Posts
    69
    create a subdoman and redirect it to the user's home directory!

  3. #3
    Just Joined!
    Join Date
    Sep 2006
    Posts
    19
    Thanks for the reply mitto. may I know how do i create a subdomain? by configuring httpd.conf or apache2.conf?

    Thank you for the reply again!

  4. #4
    Just Joined!
    Join Date
    Jun 2006
    Location
    (.)
    Posts
    69
    I think you need to edit the httpd.conf and have to add the new virtual host entry in it which has

    ServerName = your subdomain
    DocumentRoot = your path to that file.

    That all need to do

  5. #5
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,844
    Quote Originally Posted by mitto
    I think you need to edit the httpd.conf and have to add the new virtual host entry in it which has

    ServerName = your subdomain
    DocumentRoot = your path to that file.

    That all need to do
    There's just a litte bit more to it than that. Here's what you do:

    1. Adapt your DNS system so that user.yourdomain.com resolves to www.yourdomain.com or just yourdomain.com

    2. Set up a new virtual host in your /etc/httpd/conf/httpd.conf, these are normally at the end of the file, and should look a bit like this:

    Code:
    <VirtualHost *:80>
      ServerAdmin serveradmin@yourdomain.com
      DocumentRoot <put your web pages path here>
      ServerName user.yourdomain.com
      ServerAlias user
      ServerPath /user
    </VirtualHost>
    3. Add a Directory entry in the httpd.conf file to set the access permissions for the new directory - these are normally all together in the middle of the file; something like this:

    Code:
    <Directory "<put your web pages path here>">
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
    </Directory>
    4. Check, and if necessary fix, the premissions on the web pages path - the httpd process must have read access.

    5. Restart the httpd service - usually 'service httpd restart' or '/etc/rc.d/init.d/httpd restart'
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •