The problem with that arrangement is that in order to make it work
/www needs to be accessible by apache, and he subfolders, and
therefore that means that /www/application is also accessible by
apache and so creates a security risk for the application.

The reason why symfony is structured like /application/web is that
only the web directory needs to be open to apache and the rest of the
application is securely stored above it where apache cannot access
files.

Hope that helps a bit

On Wed, Feb 10, 2010 at 9:34 AM, Tom Ptacnik <to...@tomor.cz> wrote:
> Shorter question :-)
>
> Did someone tryied to change project structure to:
>
> /www    (web folder - index.php, .htaccess, css, js....)
> /www/application    (rest of the application - apps,cache,config,....)
>
> and had some problems with that?
>
> Thank you for your responses.
>
>
> On 9 ún, 07:59, Tom Ptacnik <to...@tomor.cz> wrote:
>> Hello,
>>
>> I want to know what do you think about my new Somfony project
>> structures which I've created.
>>
>> I needed to change it, because of my clients hosting. He host on the
>> server, where he can't change anything in apache configuration.
>> He has configured hosting that way, that every folder in his webfolder
>> is a subdomain....
>> /www iswww.domain.com, /new is new.domain.com etc. So every subfolder
>> is "like a" virtual.
>>
>> The problem is, that I can't deploy the application into the parent
>> folder and thus use classic symfony structure and use /www for a
>> classic symfony webfolder.
>>
>> I've created two functional project structures, which works on his
>> host and I want to know your judgement :)
>>
>> In both ways I have web folder directly in the /www folder
>> In both ways I can't create the /sf alias - so I simply copied the /sf
>> folder to the /www folder
>>
>> 1)
>> /www (web folder - index.php, .htaccess, css, js....)
>> /application (rest of the application - apps,cache,config, data,....)
>>
>> In this solution I've created .htacces with "deny from all" and
>> inserted it to the /application folder - for denying the access to the
>> application subdomain which is automaticly created by the settings of
>> the webserver.
>>
>> 2)
>> /www    (web folder - index.php, .htaccess, css, js....)
>> /www/application    (rest of the application - apps,cache,config,
>> data,....)
>>
>> In this solution I've inserted the application directory into the www
>> folder. Created the .htaccess with "deny from all" in it too - deny
>> the access to thewww.domain.com/application
>>
>> I like this second solution because I have whole application in one
>> directory. It look pretty compact to me.
>>
>> For both possibilities need only to change 3 things
>> - the web folder path in the /config/ProjectConfiguration.class.php:
>> $this->setWebDir($this->getRootDir().'/../');
>> - the include of the ProjectConfiguration.class.php in all indexes
>> (index.php, frontend_dev.php)
>> - uncomment the  RewriteBase / in the standard symfony .htaccess file
>>
>> The image is maybe more explainable  :http://tinyurl.com/yzf3na3
>> (on the picture the application folder of the 1) solution is named
>> "app" )
>>
>> I haven't created whole functional application, I've only generated a
>> frontend application and managed to show the  "Congratulations! You
>> have successfully created your symfony project." page.
>> So I think, it will work..
>>
>> Before I will start to develope the application I want to know your
>> opinion.
>>
>> Please tell me what do you think about this solutions and if you know
>> some disadvantages / advantages of some of them...
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
>
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.

Reply via email to