[symfony-users] Re: Many sites using the same application
Has any one tried sfMultisiteGuardPlugin and sfMultisiteThemePlugin ? I still think this thread needs more input on how others do this. On May 26, 10:26 am, Guilherme Veras guilhermeve...@gmail.com wrote: I casually create centralized applications. Put in the folder WEB systems available thus gain a high rate of reuse of classes and specific functions. In addition, clear framework to keep my updated. But the architecture of symfony is perfect and allows you to make extensions or even mix the two architectures. On 22 abr, 16:48, Rafael Vieira rafael.vie...@malapronta.com.br wrote: Nei and all, About this kind of architecture, what do you guys think its the best option: a) Create a centralized application, shared by many websites or b) Create many applications, one for each website (and all the sites are the same, with some css customization and different content)? What you guys think its the best choice? We know that both formats have its pros and cons but we're in doubt about wich way to take. Any ideas? Rafael Vieira On 15 abr, 19:03, Nei Rauni Santos nra...@gmail.com wrote: Hi guys, Anyone here already created a Symfony's project where the frontend application is shared by many websites?? I would be happy if you could share this experience with me. I need to recreate an application like this and I'm thinking to do this in the following way: - I already has a table called cms.sites.. table: cms.sites columns: id, name, url, css, js, created_at, updated_at my frontend: - an application frontend - a module home I have a filter where it gets the url of request and consult the table sites to get info about it, like js, css my server: www.example1.com.br server: host.test.com document_root: /home/example1/site www.example2.com.br server: host.test.com document_root: /home/example2/site www.example3.com.br server: host.test.com document_root: /home/example3/site some details: - some directories like js, images and css have a symbolic link to the same centralized directory. - I have an other application called admin installed in another place where I use it to manage the database and to configure the frontends. Some doubts are: - How is the better way to structure the project? - Is it better to configure each domain with its own document_root or to point all domains to the same document_root? some domains has more traffic than others. So, I need that to work fine because if one fail all them will also fail. Regards, NeiRauniSantoshttp://blog.inuar.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
As Eran said... The ysfDimensions plugin will do exactly what you need, and it's very easy to use. http://www.symfony-project.org/plugins/ysfDimensionsPlugin On May 27, 12:25 pm, Richtermeister nex...@gmail.com wrote: Hey AJ, I see the sfMultisiteGuardPlugin in the repository, but it seems empty.. is it really available? I'm still working on pretty much exactly what's described in this thread, and I'm getting good results with the sfDynamicCMS plugin, since it already separates content by application. All I needed to do is simulate different applications according to what domain accesses the app, and voila, you get separate websites running off one app. Thanks, Daniel On May 26, 4:28 pm, AJStoneham astone...@yahoo.com wrote: Has any one tried sfMultisiteGuardPlugin and sfMultisiteThemePlugin ? I still think this thread needs more input on how others do this. On May 26, 10:26 am, Guilherme Veras guilhermeve...@gmail.com wrote: I casually create centralized applications. Put in the folder WEB systems available thus gain a high rate of reuse of classes and specific functions. In addition, clear framework to keep my updated. But the architecture of symfony is perfect and allows you to make extensions or even mix the two architectures. On 22 abr, 16:48, Rafael Vieira rafael.vie...@malapronta.com.br wrote: Nei and all, About this kind of architecture, what do you guys think its the best option: a) Create a centralized application, shared by many websites or b) Create many applications, one for each website (and all the sites are the same, with some css customization and different content)? What you guys think its the best choice? We know that both formats have its pros and cons but we're in doubt about wich way to take. Any ideas? Rafael Vieira On 15 abr, 19:03, Nei Rauni Santos nra...@gmail.com wrote: Hi guys, Anyone here already created a Symfony's project where the frontend application is shared by many websites?? I would be happy if you could share this experience with me. I need to recreate an application like this and I'm thinking to do this in the following way: - I already has a table called cms.sites.. table: cms.sites columns: id, name, url, css, js, created_at, updated_at my frontend: - an application frontend - a module home I have a filter where it gets the url of request and consult the table sites to get info about it, like js, css my server: www.example1.com.br server: host.test.com document_root: /home/example1/site www.example2.com.br server: host.test.com document_root: /home/example2/site www.example3.com.br server: host.test.com document_root: /home/example3/site some details: - some directories like js, images and css have a symbolic link to the same centralized directory. - I have an other application called admin installed in another place where I use it to manage the database and to configure the frontends. Some doubts are: - How is the better way to structure the project? - Is it better to configure each domain with its own document_root or to point all domains to the same document_root? some domains has more traffic than others. So, I need that to work fine because if one fail all them will also fail. Regards, NeiRauniSantoshttp://blog.inuar.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
I casually create centralized applications. Put in the folder WEB systems available thus gain a high rate of reuse of classes and specific functions. In addition, clear framework to keep my updated. But the architecture of symfony is perfect and allows you to make extensions or even mix the two architectures. On 22 abr, 16:48, Rafael Vieira rafael.vie...@malapronta.com.br wrote: Nei and all, About this kind of architecture, what do you guys think its the best option: a) Create a centralized application, shared by many websites or b) Create many applications, one for each website (and all the sites are the same, with some css customization and different content)? What you guys think its the best choice? We know that both formats have its pros and cons but we're in doubt about wich way to take. Any ideas? Rafael Vieira On 15 abr, 19:03, Nei Rauni Santos nra...@gmail.com wrote: Hi guys, Anyone here already created a Symfony's project where the frontend application is shared by many websites?? I would be happy if you could share this experience with me. I need to recreate an application like this and I'm thinking to do this in the following way: - I already has a table called cms.sites.. table: cms.sites columns: id, name, url, css, js, created_at, updated_at my frontend: - an application frontend - a module home I have a filter where it gets the url of request and consult the table sites to get info about it, like js, css my server: www.example1.com.br server: host.test.com document_root: /home/example1/site www.example2.com.br server: host.test.com document_root: /home/example2/site www.example3.com.br server: host.test.com document_root: /home/example3/site some details: - some directories like js, images and css have a symbolic link to the same centralized directory. - I have an other application called admin installed in another place where I use it to manage the database and to configure the frontends. Some doubts are: - How is the better way to structure the project? - Is it better to configure each domain with its own document_root or to point all domains to the same document_root? some domains has more traffic than others. So, I need that to work fine because if one fail all them will also fail. Regards, NeiRauniSantoshttp://blog.inuar.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
Hey Nei, this is so weird, I will be starting a project this weekend that seems to have the same goal / structure. A CMS for multiple websites.. If you like I'd be interested in emailing you directly so we can share some ideas and figure out how to best build this using symfony. Daniel On Apr 16, 8:34 am, Nei Rauni Santos nra...@gmail.com wrote: I have a similar structure actually.. about the Directory Index I'm using too! Have you already created this kind of structure with just one document_root? Thanks, Nei On Apr 16, 4:33 am, Alexandru-Emil Lupu gang.al...@gmail.com wrote: instead of using ln -s, you might wanna do something like in your apache config: server 2: Alias /css /home/example1/site/web/css Alias /js /home/example1/site/web/js server 3: Alias /css /home/example1/site/web/css Alias /js /home/example1/site/web/js 2) also ... if your websites are just mirrors why don't you make an alias and have just one big vhost 3) if your websites uses different applications of the same project, then you could change the directory index directive in the vhost config and set it to point to a different page. Ex: all doc roots are pointing in the same location, but the Directory Index points out one for index.php (the default) , second for app2.php and 3rd for app3.php.. Do not use symlinks in your application. (except maybe for cache log dir if you use capistrano or so for deplyement) If you have the same frontend, then relax.. if one fails, all will do. :) alecs On Thu, Apr 16, 2009 at 1:13 AM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Create a symbolic link on your server? Search Google for the command ln -s! On 16 apr, 00:03, Nei Rauni Santos nra...@gmail.com wrote: Hi guys, Anyone here already created a Symfony's project where the frontend application is shared by many websites?? I would be happy if you could share this experience with me. I need to recreate an application like this and I'm thinking to do this in the following way: - I already has a table called cms.sites.. table: cms.sites columns: id, name, url, css, js, created_at, updated_at my frontend: - an application frontend - a module home I have a filter where it gets the url of request and consult the table sites to get info about it, like js, css my server: www.example1.com.br server: host.test.com document_root: /home/example1/site www.example2.com.br server: host.test.com document_root: /home/example2/site www.example3.com.br server: host.test.com document_root: /home/example3/site some details: - some directories like js, images and css have a symbolic link to the same centralized directory. - I have an other application called admin installed in another place where I use it to manage the database and to configure the frontends. Some doubts are: - How is the better way to structure the project? - Is it better to configure each domain with its own document_root or to point all domains to the same document_root? some domains has more traffic than others. So, I need that to work fine because if one fail all them will also fail. Regards, Nei Rauni Santoshttp://blog.inuar.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
I run three or for different set ups where the sites share common code, but the look and feel is different to some extent. each of the two examples below run about 12 differnet sites, with varying degrees of shared content - i wont post all the ULR's or it will look like i'm link spamming, but a couple of instances are http://savewatersavemoney.co.uk http://st.savewatersavemoney.co.uk http://awdirect.savewatersavemoney.co.uk (these all share a common domain, and have different branding based on the subdomain, as you will see, the first two are very similar - the last is very different. a seperare set up is. http://www.northwestitjobs.co.uk http://www.southeastitjobs.co.uk these are very similar - but have different domain names, i have a couple of other requirements, in that its possible to add new domains on the fly, so i store my site data in a db table - you dont have to, its just easier for the way i need to do things. the example below is for symfony 1.0, and im doing this from memory, so i dont have al the details to hand, but its enough to get started - i can provide more details tomorow if you wanrt though. so a table, called site. id, site_name url_map. branding_folder site_title etc etc each of my actions has a preExecute method like so. (though if i was re writing i'd probably use a filter i guess) public function preExecute() { siteBranding::getSiteBrandingDetails($this); } the method matches the current request url to the url_map column, if it finds a match it changes the template to be a customised one. $site = SitePeer::retrieveByURL($_SERVER['HTTP_HOST']); // basically just does a simple SitePeer::doSelectOne() if($site){ $action-site=$site; // $action is the $this we passed in above, sfContext::getInstance()-getResponse()-setTitle($action-site- getSiteName()); sfContext::getInstance()-getUser()-setAttribute(current_site, $site); // i store this in the session so that i dont have to do the look up every time - if the value is set, it just returns the existing site. $action-setLayout(sfConfig::get('sf_web_dir').$site- getBrandingFolder()./layout ); }else{ $action-setLayout( sfConfig::get('sf_web_dir'). /branding/sites/generic/layout); } sorry thats all a bit messy, but as i say - shout if you want to see the proper code (or feel free to post about why my method of doing it sucks - always happy to see other view points ;-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
There is a plugin called ysfDimension. You might want to look at that. 2009/4/17 Derek Almond iamde...@gmail.com I run three or for different set ups where the sites share common code, but the look and feel is different to some extent. each of the two examples below run about 12 differnet sites, with varying degrees of shared content - i wont post all the ULR's or it will look like i'm link spamming, but a couple of instances are http://savewatersavemoney.co.uk http://st.savewatersavemoney.co.uk http://awdirect.savewatersavemoney.co.uk (these all share a common domain, and have different branding based on the subdomain, as you will see, the first two are very similar - the last is very different. a seperare set up is. http://www.northwestitjobs.co.uk http://www.southeastitjobs.co.uk these are very similar - but have different domain names, i have a couple of other requirements, in that its possible to add new domains on the fly, so i store my site data in a db table - you dont have to, its just easier for the way i need to do things. the example below is for symfony 1.0, and im doing this from memory, so i dont have al the details to hand, but its enough to get started - i can provide more details tomorow if you wanrt though. so a table, called site. id, site_name url_map. branding_folder site_title etc etc each of my actions has a preExecute method like so. (though if i was re writing i'd probably use a filter i guess) public function preExecute() { siteBranding::getSiteBrandingDetails($this); } the method matches the current request url to the url_map column, if it finds a match it changes the template to be a customised one. $site = SitePeer::retrieveByURL($_SERVER['HTTP_HOST']); // basically just does a simple SitePeer::doSelectOne() if($site){ $action-site=$site; // $action is the $this we passed in above, sfContext::getInstance()-getResponse()-setTitle($action-site- getSiteName()); sfContext::getInstance()-getUser()-setAttribute(current_site, $site); // i store this in the session so that i dont have to do the look up every time - if the value is set, it just returns the existing site. $action-setLayout(sfConfig::get('sf_web_dir').$site- getBrandingFolder()./layout ); }else{ $action-setLayout( sfConfig::get('sf_web_dir'). /branding/sites/generic/layout); } sorry thats all a bit messy, but as i say - shout if you want to see the proper code (or feel free to post about why my method of doing it sucks - always happy to see other view points ;-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
Derek Almond wrote: I run three or for different set ups where the sites share common code, but the look and feel is different to some extent. each of the two examples below run about 12 differnet sites, with varying degrees of shared content - i wont post all the ULR's or it will look like i'm link spamming, but a couple of instances are http://savewatersavemoney.co.uk http://st.savewatersavemoney.co.uk This one gets me a white page with It works!... Just FYI -- Nathanael d. Noblet T: 403.875.4613 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
instead of using ln -s, you might wanna do something like in your apache config: server 2: Alias /css /home/example1/site/web/css Alias /js /home/example1/site/web/js server 3: Alias /css /home/example1/site/web/css Alias /js /home/example1/site/web/js 2) also ... if your websites are just mirrors why don't you make an alias and have just one big vhost 3) if your websites uses different applications of the same project, then you could change the directory index directive in the vhost config and set it to point to a different page. Ex: all doc roots are pointing in the same location, but the Directory Index points out one for index.php (the default) , second for app2.php and 3rd for app3.php.. Do not use symlinks in your application. (except maybe for cache log dir if you use capistrano or so for deplyement) If you have the same frontend, then relax.. if one fails, all will do. :) alecs On Thu, Apr 16, 2009 at 1:13 AM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Create a symbolic link on your server? Search Google for the command ln -s! On 16 apr, 00:03, Nei Rauni Santos nra...@gmail.com wrote: Hi guys, Anyone here already created a Symfony's project where the frontend application is shared by many websites?? I would be happy if you could share this experience with me. I need to recreate an application like this and I'm thinking to do this in the following way: - I already has a table called cms.sites.. table: cms.sites columns: id, name, url, css, js, created_at, updated_at my frontend: - an application frontend - a module home I have a filter where it gets the url of request and consult the table sites to get info about it, like js, css my server: www.example1.com.br server: host.test.com document_root: /home/example1/site www.example2.com.br server: host.test.com document_root: /home/example2/site www.example3.com.br server: host.test.com document_root: /home/example3/site some details: - some directories like js, images and css have a symbolic link to the same centralized directory. - I have an other application called admin installed in another place where I use it to manage the database and to configure the frontends. Some doubts are: - How is the better way to structure the project? - Is it better to configure each domain with its own document_root or to point all domains to the same document_root? some domains has more traffic than others. So, I need that to work fine because if one fail all them will also fail. Regards, Nei Rauni Santoshttp://blog.inuar.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
I have a similar structure actually.. about the Directory Index I'm using too! Have you already created this kind of structure with just one document_root? Thanks, Nei On Apr 16, 4:33 am, Alexandru-Emil Lupu gang.al...@gmail.com wrote: instead of using ln -s, you might wanna do something like in your apache config: server 2: Alias /css /home/example1/site/web/css Alias /js /home/example1/site/web/js server 3: Alias /css /home/example1/site/web/css Alias /js /home/example1/site/web/js 2) also ... if your websites are just mirrors why don't you make an alias and have just one big vhost 3) if your websites uses different applications of the same project, then you could change the directory index directive in the vhost config and set it to point to a different page. Ex: all doc roots are pointing in the same location, but the Directory Index points out one for index.php (the default) , second for app2.php and 3rd for app3.php.. Do not use symlinks in your application. (except maybe for cache log dir if you use capistrano or so for deplyement) If you have the same frontend, then relax.. if one fails, all will do. :) alecs On Thu, Apr 16, 2009 at 1:13 AM, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Create a symbolic link on your server? Search Google for the command ln -s! On 16 apr, 00:03, Nei Rauni Santos nra...@gmail.com wrote: Hi guys, Anyone here already created a Symfony's project where the frontend application is shared by many websites?? I would be happy if you could share this experience with me. I need to recreate an application like this and I'm thinking to do this in the following way: - I already has a table called cms.sites.. table: cms.sites columns: id, name, url, css, js, created_at, updated_at my frontend: - an application frontend - a module home I have a filter where it gets the url of request and consult the table sites to get info about it, like js, css my server: www.example1.com.br server: host.test.com document_root: /home/example1/site www.example2.com.br server: host.test.com document_root: /home/example2/site www.example3.com.br server: host.test.com document_root: /home/example3/site some details: - some directories like js, images and css have a symbolic link to the same centralized directory. - I have an other application called admin installed in another place where I use it to manage the database and to configure the frontends. Some doubts are: - How is the better way to structure the project? - Is it better to configure each domain with its own document_root or to point all domains to the same document_root? some domains has more traffic than others. So, I need that to work fine because if one fail all them will also fail. Regards, Nei Rauni Santoshttp://blog.inuar.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---
[symfony-users] Re: Many sites using the same application
Create a symbolic link on your server? Search Google for the command ln -s! On 16 apr, 00:03, Nei Rauni Santos nra...@gmail.com wrote: Hi guys, Anyone here already created a Symfony's project where the frontend application is shared by many websites?? I would be happy if you could share this experience with me. I need to recreate an application like this and I'm thinking to do this in the following way: - I already has a table called cms.sites.. table: cms.sites columns: id, name, url, css, js, created_at, updated_at my frontend: - an application frontend - a module home I have a filter where it gets the url of request and consult the table sites to get info about it, like js, css my server: www.example1.com.br server: host.test.com document_root: /home/example1/site www.example2.com.br server: host.test.com document_root: /home/example2/site www.example3.com.br server: host.test.com document_root: /home/example3/site some details: - some directories like js, images and css have a symbolic link to the same centralized directory. - I have an other application called admin installed in another place where I use it to manage the database and to configure the frontends. Some doubts are: - How is the better way to structure the project? - Is it better to configure each domain with its own document_root or to point all domains to the same document_root? some domains has more traffic than others. So, I need that to work fine because if one fail all them will also fail. Regards, Nei Rauni Santoshttp://blog.inuar.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@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 -~--~~~~--~~--~--~---