...

View Full Version : multiple httpd's on fedora



GO ILLINI
11-23-2005, 02:04 AM
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?

gsnedders
11-23-2005, 02:28 PM
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

Noodles24
11-25-2005, 03:18 PM
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:



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):



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/

GO ILLINI
11-25-2005, 07:52 PM
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?


<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.

Noodles24
11-26-2005, 11:27 AM
Looks ok, apart from this:



ServerAdmin webmaster@poop.com:9999


Email addresses don't use ports

GO ILLINI
11-26-2005, 02:56 PM
ohh ya wooops forgot about that, just a stupid mistake. Thanks though.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum