+ Reply to Thread
Results 1 to 5 of 5

Thread: Some help with apache..

  1. #1
    javajenius's Avatar
    javajenius is offline x10 Lieutenant javajenius is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    258

    Some help with apache..

    I have my own virtual linux server up and running and i came across a problem.
    I created a couple of users, and I need to make each user have his/her own apache web directory root.
    Is there anyway to do this automatically or will I have to write my own script?

    Like here:

    Code:
    Listen 80
    NameVirtualHost *
    
    <VirtualHost *>
    ServerName www.domain.com
    DocumentRoot /home/httpd/user1/htdocs/
    </VirtualHost>
    
    <VirtualHost *>
    ServerName subdomain.domain.com
    DocumentRoot /home/httpd/user2/htdocs/subdomain/
    </VirtualHost>
    Last edited by javajenius; 05-16-2008 at 10:24 PM.

  2. #2
    LHVWB's Avatar
    LHVWB is offline Lord Of The Keys LHVWB is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Australia
    Posts
    1,308

    Re: Some help with apache..

    * Moved to computers and technology forum, this thread is more about computer configuration than actually programming.

  3. #3
    javajenius's Avatar
    javajenius is offline x10 Lieutenant javajenius is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    258

    Re: Some help with apache..

    ^Actually I think i said that i need to create a script to do this automatically, but its fine.

  4. #4
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,502

    Re: Some help with apache..

    Looking over the documentation for DocumentRoot (and <VirtualHost>), it looks like your options are to write a script to create the configuration (as you mentioned) or write a module if you want to automatically set DocumentRoot. If you're using Apache 1.3, the source for mod_example may be helpful in writing a module.

    Alternatively, if you don't have many users and create new ones infrequently, automatic configuration may not be worth the effort.

  5. #5
    javajenius's Avatar
    javajenius is offline x10 Lieutenant javajenius is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    258

    Re: Some help with apache..

    Actually, i need do to it automatically (for a project im working on), so i will try to work on it. Thanks for your reply.
    Last edited by javajenius; 05-18-2008 at 09:19 PM.

+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 02-20-2008, 05:15 AM
  2. configuring php on localhost
    By ufclan in forum Scripts & 3rd Party Apps
    Replies: 15
    Last Post: 01-22-2008, 08:34 AM
  3. installing Apache in Localhost.
    By naim4u in forum Tutorials
    Replies: 5
    Last Post: 01-20-2008, 04:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers