2009/7/2 Felipe Hummel <[email protected]>

>
> That leads to my first question. So I can't have both /var/www and my
> symfony directory (like /home/felipe/symfony) accessible from
> localhost. Right?
>
> So I can put my symfony project in /var/www/myproject. But I know
> there are some security problems. Is there a way to overcome them?
> Like the databases.yml?
>
> Thanks



not sure if im missing something, but i would normally have

/var/www  as localhost
/home/felipe/symfony  as http://symfony.local
/home/felipe/symfony2  as http://symfony2.local

ie a differnet vhost for each symfony project.

make sure you have

NameVirtualHost *:80

set in your apache config

.

I'm guessing that you're on some kind of linux from the paths you gave, so
here's an example vhost (its for symfony 1.0)


<VirtualHost *:80>
ServerName symfony.local
DocumentRoot /home/felipe/symfony/web
DirectoryIndex index.php
php_flag magic_quotes_gpc off
php_flag register_globals off
Alias /sf /usr/share/php/data/symfony/web/sf
<Directory /home/felipe/symfony/web>
AllowOverride All
Allow from All
</Directory>
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
</VirtualHost>

<VirtualHost *:80>
ServerName symfony2.local
DocumentRoot /home/felipe/symfony2/web
DirectoryIndex index.php
php_flag magic_quotes_gpc off
php_flag register_globals off
Alias /sf /usr/share/php/data/symfony2/web/sf
<Directory /home/felipe/symfony/web>
AllowOverride All
Allow from All
</Directory>
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
</VirtualHost>



to make these work

add this to

/etc/hosts

127.0.0.1  symfony.local
127.0.0.1  symfomy2.local



you *may* need to change your default config to be a virtualhost on 80 as
well, i.e it may look like this


<VirtualHost>

it need to look like this


<VirtualHost *:80>


hth, sorry if i've missed the point entirly

D



>
>
>
> Felipe Hummel
>
> On 2 jul, 13:37, Gábor Fási <[email protected]> wrote:
> > Yes, but you may have multiple hosts. For example, I have
> > projectname.local for every major project I have, it points to the
> > project's web dir; and I have localhost to point to /var/www for minor
> > projects, the quick n' dirty stuff.
> > If you use this, don't forget to point your newly created host to
> > 127.0.0.1 in the hosts file.
> >
> > On Thu, Jul 2, 2009 at 19:29, Felipe Hummel<[email protected]>
> wrote:
> >
> > > When I call:
> > >http://localhost
> > > What will appear?
> >
> > > It seems only one of both can be used.
> >
> > > On 2 jul, 10:53, Gábor Fási <[email protected]> wrote:
> > >> You can leave the original VirtualHost in httpd.conf for everything
> > >> else, and add another one for your symfony project.
> >
> > >> On Thu, Jul 2, 2009 at 16:15, Felipe Hummel<[email protected]>
> wrote:
> >
> > >> > Hi, I've been playing around with Symfony for a time, but neve took
> it
> > >> > to production. But I'm about to do it.
> > >> > I'm going to deploy a Symfony based application in a Ubuntu web
> server
> > >> > with Apache.
> > >> > I've tested the VirtualHost configuration and it works fine, but
> > >> > everything that was at "/var/www" is not accessible anymore.
> > >> > In my case /var/www has to be seen and used normally because this
> > >> > won't be the only website on the server, and I can't assume that for
> > >> > each project someone will have to re-configure apache, people just
> > >> > want to put things in /var/www and use it (I'm in a university).
> >
> > >> > That said, my problem is how to configure a Symfony application in a
> > >> > non-/var/www directory but also leaving /var/www normally
> accessible?
> >
> > >> > Just an example.
> > >> > I want to access my symfony application with:
> http://localhost/symfony_app/
> > >> > (located at /home/felipe/workspace....)
> > >> > But I can also have a WikiMedia Wiki at:http://localhost/wiki/
> > >> > (located at /var/www/wiki)
> >
> > >> > Sorry if this question is more about Apache than Symfony.
> >
> > >> > Thanks
> >
> > >> > Felipe Hummel
> >
>

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