The openlayers.org website is hosted on OSGeo infrastructure. The Apache config for the OpenLayers website is location on openlayers.org in /etc/apache2/sites-available/openlayers. This config describes a few virtual hosts:
- m.openlayers.org - redirects to listing of mobile examples (http://openlayers.org/dev/examples/?q=mobile)
- docs.openlayers.org (root /osgeo/openlayers/sites/docs.openlayers.org) - sphinx docs
- dev.openlayers.org (root /osgeo/openlayers/sites/dev.openlayers.org) - hosted releases, old sandboxes, nightly build
- openlayers.org (root /osgeo/openlayers/sites/openlayers.org) - main website
Updating the Website & Examples
Periodically, the update_dev_dir.sh script is run to update the working copy of the website source, to update the hosted examples with the latest from the trunk, parse metadata from the examples, build an example index, and build a single-file OpenLayers.js.
The frequency of this process is determined by a cron job on the openlayers.org machine. To get details on this job, run the following:
sudo crontab -u openlayers -l
If there are conflicts in the update for some reason, this job may fail. If you clean things up in the target directory or otherwise need to manually run this job, do so as the openlayers user:
sudo -u openlayers /osgeo/openlayers/repos/openlayers/tools/update_dev_dir.sh
Modifying the Website
You can check out the website sources from the repository, make local modifications, and see what those changes are going to look like on the live site before committing them. To do this, you'll need to modify your Apache config to process the SSI directives in the website markup. In addition, it is convenient to proxy the requests to /api/OpenLayers.js. Below is a sample config section that handles requests to http://ol-localhost/. For this Apache config to work the following Apache modules should installed and enabled: proxy, proxy_html, and include (e.g. sudo a2enmod include proxy proxy_html).
<VirtualHost *:80> DocumentRoot /Users/tschaub/projects/openlayers/website ServerName ol-localhost <Directory /Users/tschaub/projects/openlayers/website> Options Indexes MultiViews Includes AllowOverride None Order allow,deny Allow from all AddType text/html .shtml AddOutputFilter INCLUDES .shtml DirectoryIndex index.shtml </Directory> ProxyRequests Off ProxyPreserveHost Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /api http://openlayers.org/api ProxyPassReverse /api http://openlayers.org/api </VirtualHost>
This assumes you have the website checked out (in some place like /Users/tschaub/projects/openlayers/website) and that you add an ol-localhost entry to your hosts file. Here's an example line from an /etc/hosts file:
With this configuration, you should be able to see what the website will look like by loading http://ol-localhost/.
and typing a name in the bottom of the page.
For OpenLayers trunk, the same prinicple applies:
These updates should take place immediately.