Skip to main content

Home/ Drupal for Developers/ Group items tagged apache

Rss Feed Group items tagged

Daniel Gregoire

Load Testing Tools and Tips | Tag1 Consulting, Inc. - 1 views

  • ApacheBench (ab)
  • $ ab -n1000 -c10 http://localhost/
  • Links: Project's web page: http://httpd.apache.org/docs/trunk/programs/ab.html Benchmarking Drupal code with ab: http://drupal.org/node/79237
  • ...5 more annotations...
  • Siege
  • siege -c 10 -i -t 5m -d 3 -f url_list.txt
  • Links: Project's web page: http://www.joedog.org/JoeDog/Siege Sproxy project page: http://www.joedog.org/JoeDog/Sproxy
  • Apache JMeter
  • Links: Project's web page: http://jakarta.apache.org/jmeter/ Load testing Drupal with JMuery, part 1: http://www.johnandcailin.com/blog/john/load-test-your-drupal-application... Load testing Drupal with JMuery, part 2: http://www.johnandcailin.com/blog/john/load-test-your-drupal-application...
  •  
    Load testing tools. ab and siege are command-line, JMeter is graphical (and written in Java).
Daniel Gregoire

Apache Solr and Drupal Default's Search | Trellon - 0 views

  • One issue that comes up from ApacheSolr being a separate search page is that the search form does not go to it by default. This is the $search_box in the page.tpl.php template. The way we change this behavior is to add a new submission handler to that form. You can create a custom module for this or put it in your custom theme. <?php/*** Implementation of hook_form_alter()*/function custommodule_form_alter(&$form, $form_state, $form_id) {  // Add submission handler to redirect to apachesolr  if ($form_id == 'search_theme_form') {    // Add a submit, because the search form redirects to a specific place    $form['#submit'][] = 'custommodule_search_submit';  }}/*** Implementation of form submit function*/function custommodule_search_submit($form, &$form_state) {  // Get form ID  $form_id = $form['form_id']['#value'];  // Create new redirect  $form_state['redirect'] = 'search/apachesolr_search/'. trim($form_state['values'][$form_id]);}?>
Daniel Gregoire

On RHEL and CentOS. | drupal.org - 0 views

  •  
    Script and explanation of getting Solr setup as a service in RHEL/CentOS.
Daniel Gregoire

Restrict specific folders from public download (via .htaccess) | drupal.org - 0 views

  • If you set "public" as the download method, you can still protect some of your folders by settings in your .htaccess file, if you have mod_rewrite enabled. For instance, if your files live in sites/default/files, and you want to protect everything in sites/default/files/protected_download_dir, then you can add the following line to your central .htaccess file: RewriteRule ^sites\/default\/files\/(protected_download_dir\/.*)$ index.php?q=system/files/$1 The files in this folder (or, all files that match the regular expression) will not be served directly by apache, but by a full drupal request using the file_download() callback. The routing for system/files is defined in system_menu(). Access Checking for File Downloads Modules can do access checking on files downloaded through file_download(), by implementing hook_file_download(). For instance, the filefield module will do access checking for all files that you upload via filefield. It will only give access to people who are allowed to see the node and the field the file belongs to. In addition, you can look for modules that restrict file downloads based on the folder name or other criteria. Access Checking built-in with Filefield The filefield module has access checking built-in. To make use of this, please Make sure to use the latest dev version of filefield (for now). The current offical release (08/2009) has a bug in access checking. Have a look into filefield issue 516104. Configure the filefield you want to protect. Use the filefield path module, to define where the files for the filefield should be stored by default. Add a line to your .htaccess to protect this folder (see above). Use whatever modules to restrict node or field access.
1 - 9 of 9
Showing 20 items per page