CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • static file server
Pages: [1]

Author Topic: static file server  (Read 2094 times)

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
static file server
June 08, 2009, 08:52:02 am
I was experimenting with hiving off static files to a separate server, with the idea of getting more scaling out of my main mod php server. It's sort of working with Drupal.

For civicrm the code seems well setup for this, with all the static files sitting nicely in their own folders and a property pointing to the right url that can be tweaked [i was doing this a while ago and forgot exactly where..]. Of course, you can't do this for https connections or browsers complain, but I wonder if anyone's thought about this or implemented it?


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: static file server
June 08, 2009, 11:01:22 am

heard good things about percona from jeremy z's blog (http://jeremy.zawodny.com/blog/)

i suspect it should work. Been on my list of things to try, but no compelling reason as yet :)

for static gif / html etc, you can set the resource url in administer civicrm >> global settings >> urls

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
dynamic fastcgi server
June 09, 2009, 10:04:22 pm
Hi,

Another option is to have a light web serber (lighttpd, ningx) as a frontend and proxy and have fastcgi server(s) on another machine to do the php thing

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: static file server
June 10, 2009, 06:52:11 am
> for static gif / html etc, you can set the resource url in administer civicrm >> global settings >> urls

yes, but it doesn't work (or didn't on the version i tried) because somewhere in the code it gets the domain chopped off.

i added a little patch that prevents that if the domain is different, but there were still some issues as i recall.


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: static file server
June 10, 2009, 08:28:19 am

argh

that was a change in 2.2. Do you want to file an issue and contribute that patch back. Getting that working again should not be too hard (or so i hope)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: static file server
June 15, 2009, 07:43:55 am
okay for those of you following along at home, for 2.2.5 i made this replacement:

diff Config.php /home/drupal/civicrm/2.2.1/CRM/Core
397c397
<             $this->resourceBase = $rrb['path'];
---
>             $this->resourceBase = ($rrb['host'] == $_SERVER['HTTP_HOST']) ? $rrb['path'] : $this->userFrameworkResourceURL;

I'll file a bug report too.

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: static file server
June 18, 2009, 08:46:13 am
lobo: thanks for putting this in.

it would appear that no one is actually using this feature - i've discovered that the contact editing page doesn't work when you enable the resource urls on a different domain.

see: http://issues.civicrm.org/jira/browse/CRM-4658

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • static file server

This forum was archived on 2017-11-26.