Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts

    multiple httpd's on fedora

    Does anyone know how ro run multiple httpd's on linux fedora4? I have one up and running on 81 but would like alot more... one on 9999, one on 82, and one on 83, and so on until i decide to stop letting people have sites on it.
    My purpose is(as i said) to let people have their own www root and and port. I looked at virtual host but you cant do ports with that can you?
    Why not thank me?

    http://adamsworld.name

  • #2
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by GO ILLINI
    My purpose is(as i said) to let people have their own www root and and port. I looked at virtual host but you cant do ports with that can you?
    It's virtual hosts you need... I'm not sure of the exact details, but I do know it is easily possible, and well documented.

    http://httpd.apache.org/docs/2.0/vhosts/name-based.html

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Location
    UK
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by GO ILLINI
    I looked at virtual host but you cant do ports with that can you?
    It does work with ports, but it's easier using port 80 and using virtual hosts with domain names:

    Code:
    NameVirtualHost 1.2.3.4
    
    <VirtualHost 1.2.3.4>
    DocumentRoot "/home/user/public_html/"
    ServerName www.userdomain.com
    </VirtualHost>
    Or if you don't have domain names to use you could do user directories like this (or something similar, haven't tested this, your path may differ):

    Code:
    LoadModule mod_userdir /usr/lib/apache2/modules/mod_userdir.so
    
    UserDir public_html
    Then users can access their sites by going to http://1.2.3.4/~user/
    Their website is then under /home/user/public_html/

  • #4
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Yes that user thing is what I am using right now... But I would like it to be a shorter url... with just a port. I know the 1.2.3.4 is the IP, but I only have 1 ip so they all share 1. Could u make me a quick example using just 2 sites, 80, and 81? With everything I would need to have for it? using the public_html in the users dir as the docroot?

    Code:
    <VirtualHost *:81>
        ServerAdmin webmaster@poop.com:81
        DocumentRoot /home/user1/public_html
        ServerName poop.com:81
        ErrorLog logs/poop.com:81-error_log
        CustomLog logs/poop.com:81-access_log common
    </VirtualHost>
    <VirtualHost *:82>
        ServerAdmin webmaster@poop.com:82
        DocumentRoot /home/user2/public_html
        ServerName poop.com:82
        ErrorLog logs/poop.com:82-error_log
        CustomLog logs/poop.com:82-access_log common
    </VirtualHost>
    <VirtualHost *:9999>
        ServerAdmin webmaster@poop.com:9999
        DocumentRoot /root/public_html
        ServerName poop.com:9999
        ErrorLog logs/poop.com:9999-error_log
        CustomLog logs/poop.com:9999-access_log common
    </VirtualHost>
    Is that right? please correct me.
    Why not thank me?

    http://adamsworld.name

  • #5
    Regular Coder
    Join Date
    Feb 2005
    Location
    UK
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Looks ok, apart from this:

    Code:
    ServerAdmin webmaster@poop.com:9999
    Email addresses don't use ports

  • #6
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    ohh ya wooops forgot about that, just a stupid mistake. Thanks though.
    Why not thank me?

    http://adamsworld.name


  •  

    Posting Permissions

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