Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Exposed workspaces through Apache

kasperg edited this page Jan 14, 2013 · 1 revision

The following Apache Virtual Host will expose all workspaces through Apache by using Virtual Document Root. This is useful when you want to expose the built version e.g. for testing purposes.

<VirtualHost *:80>
  ServerName workspaces.jenkins.kasper.reload.dk
  ServerAlias *.jenkins.kasper.reload.dk
  
  ServerAdmin kasper@reload.dk
  
  # Virtual document roots to expose all workspaces.
  # NB: This requires read access for the apache user in the jenkins directory.
  #
  # Non-drush-make
  # These documents root only works for projects which are not build using drush_make as
  # they would by default built an entire Drupal installation into the site subfolder.
  # Workspace inside job folder
  VirtualDocumentRoot /var/lib/jenkins/jobs/%1/workspace
  # Workspace in Jenkins root folder
  # VirtualDocumentRoot /var/lib/jenkins/workspace/%1
  
  <Directory /var/lib/jenkins/jobs/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
  </Directory>

  ErrorLog /var/log/apache2/workspaces.jenkins.error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn

  CustomLog /var/log/apache2/workspaces.jenkins.access.log combined  
</VirtualHost>
Clone this wiki locally