You'll need an entry like the below for each subdomain in your httpd-
vhosts.conf file:

The below is setup for having a central symfony install with multiple
apps using it, if you aren't doing that (ie: you just have the symfony
install in your projects lib folder) then you won't need the alias or
the first directory entry. If you are doing it with a central symfony
install somewhere, then you'll obviously need to change this to suit.

The document root you will need to change to suit where your symfony
project is also...

<VirtualHost *:80>
  ServerName sub1.mydomain.com
  DocumentRoot "/usr/local/projects/sub1/web"
  DirectoryIndex index.php
  Alias /sf /usr/local/symfony/symfony12/symfony-1.2.7/data/web/sf
  <Directory "/usr/local/symfony/symfony12/symfony-1.2.7/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
  <Directory "/usr/local/projects/sub1/web">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

On Jul 8, 10:28 pm, JPL <[email protected]> wrote:
> Hi, I've installed two symfonys on the same server and I want to use a
> subdomain name to access each one.
>
> EX: sub1.mydomain.com pointing on synfony1   and  sub2.mydomain.com
> pointing on synfony2 .
>
> I only have one IP available and I don't want to use port distinction.
> So I'm aware that the serverpath config  in virtualhost config is
> probably the awnser but I can't make it work.
>
> Is someone to have already done this, can help me ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to