Configure server subdomains

How can i configure a server to use apache, mysql, ruby on rails and to
add how many accounts i wan’t but to give a subdomain not a port.
thanks

I’m willing to give you a hand, but I’m not sure that I, or anyone else
for that matter, understands what you are asking.

~k

Kurth Bemis wrote:

I’m willing to give you a hand, but I’m not sure that I, or anyone else
for that matter, understands what you are asking.

~k

sorry for my english.
so i wan’t to configure my server to be a ruby hosting.
Anyone who register to have a subdomain like hisname.mydomain.com
Now ruby can recognize only 1 host at 1 port like mydomain.com:3000

many thanks
So i start the webrick server just 1 time on 3000 port.
And all subdomains will be configured from httpd.conf ?

Oh, I think I see what you want to do…

You want to have a subdomain for each user setup, and you wish to have
rails running on those sub domains.

Everything you require is within the command in your Apache
conf files. Here’s mine.

From /etc/httpd/conf.d/hosts.conf

<VirtualHost *:80>
SetEnv RAILS_ENV development
ServerName xxx.xxxxxxx.org
DocumentRoot /var/www/public/
ErrorLog /var/www/public/lmic/log/apache.log

<Directory /var/www/public/lmic>
Options ExecCGI FollowSymLinks Indexes
AddHandler fcgid-script .fcgi
AllowOverride all
Order allow,deny
Allow from all

<Directory /var/www/public/Requester>
Options ExecCGI FollowSymLinks Indexes
AddHandler fcgid-script .fcgi
AllowOverride all
Order allow,deny
Allow from all

If I wanted to change this to a subdomain, I would make sure that I
could resolve the subdomain via DNS, then change the first line to
something like , and change the
paths to reflect your setup. I’m also using Fast, so your setup might
not be exactly the same.

Checkout the apache2 (or apache) docs. I’m sure they have them in your
native language. Apache HTTP Server Version 2.2 Documentation - Apache HTTP Server Version 2.2

As for running the webrick server, it shouldn’t be run in anything but a
dev environment. I have been told by others that it is not designed for
use as a public webserver, only a dev server running locally.

I hope that I have helped point you in the correct direction.
~kurth

This may be overkill for your situation, but it should give you some
insights on how to do what you want (if I understand what you want to
do)

http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/

You should not be using the Webrick server for anything but local
development. The httpd.copnf file is an apache2 configuration file, it
has nothing to do with webrick.

If you are running linux, there are instructions on how to setup most
linux distributions with Apache and RoR. From trolling on this list, I
think that it’s possible to run RoR on IIS/Windows, but I’m not sure.
Some time spent with Google will help.

~kurth