Skip to content

Commit 78bbb65

Browse files
committed
Added docs on setting up the wcs test server
1 parent 408d266 commit 78bbb65

File tree

3 files changed

+120
-0
lines changed

3 files changed

+120
-0
lines changed

doc/INSTALL.t2t

+3
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,7 @@ source directory.
112112

113113
%!include: osx.t2t
114114

115+
%!include: wcs-test-server.t2t
116+
117+
115118
%!include: iauthors.t2t

doc/iauthors.t2t

+3
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ The following people have contributed to this document:
2727
- Tim Sutton 2006
2828
- Debian package section: Juergen Fischer 2008
2929

30+
- WCS Test Server Section
31+
- Tim Sutton, Radim Blazek 2012
32+
3033
- Latex Generator
3134
- Tim Sutton 2011

doc/wcs-test-server.t2t

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
2+
3+
= Setting up the WCS test server on GNU/Linux =
4+
5+
**Requires:** Ubuntu / Debian derived distro
6+
7+
These notes are for Ubuntu - other versions and Debian derived distros may
8+
require slight variations in package names.
9+
10+
== Preparation ==
11+
12+
Note the git repo below will change to the default QGIS repo once this work
13+
is integrated into master.
14+
15+
git remote add blazek git://github.com/blazek/Quantum-GIS.git
16+
git fetch blazek
17+
git branch --track wcs2 blazek/wcs2
18+
git checkout wcs2
19+
cd /var/www/
20+
sudo mkdir wcs
21+
sudo chown timlinux wcs
22+
cd wcs/
23+
mkdir cgi-bin
24+
cd cgi-bin/
25+
26+
== Setup mapserver ==
27+
28+
```sudo apt-get install cgi-mapserver```
29+
30+
Set the contents of cgi-bin/wcstest-1.9.0 to:
31+
32+
```
33+
#! /bin/sh
34+
MS_MAPFILE=/var/www/wcs/testdata/qgis-1.9.0/raster/wcs.map
35+
export MS_MAPFILE
36+
/usr/lib/cgi-bin/mapserv
37+
```
38+
39+
Then do:
40+
41+
```
42+
chmod +x cgi-bin/wcstest-1.9.0
43+
mkdir -p /var/www/wcs/testdata/qgis-1.9.0/raster/
44+
cd /var/www/wcs/testdata/qgis-1.9.0/raster/
45+
cp -r /home/timlinux/Quantum-GIS/tests/testdata/raster/* .
46+
```
47+
48+
Edit wcs.map and set the shapepath to this:
49+
50+
```
51+
SHAPEPATH "/var/www/wcs/testdata/qgis-1.9.0/raster"
52+
```
53+
54+
Then create /var/www/wcs/7-wcs.qgis.org.conf setting the contents to this:
55+
56+
```
57+
<VirtualHost *:80>
58+
ServerName wcs.qgis.org
59+
ServerAdmin tim@linfiniti.com
60+
61+
LogLevel warn
62+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\"" combined
63+
CustomLog /var/log/apache2/wcs_qgis.org/access.log combined
64+
ErrorLog /var/log/apache2/wcs_qgis.org/error.log
65+
66+
DocumentRoot /var/www/wcs/html
67+
68+
ScriptAlias /cgi-bin/ /var/www/wcs/cgi-bin/
69+
<Directory "/var/www/wcs/cgi-bin">
70+
AllowOverride None
71+
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
72+
Order allow,deny
73+
Allow from all
74+
</Directory>
75+
76+
RewriteEngine on
77+
RewriteRule /1.9.0/wcs /cgi-bin/wcstest-1.9.0 [PT]
78+
79+
</VirtualHost>
80+
```
81+
82+
== Create a home page ==
83+
84+
```
85+
mkdir html
86+
vim html/index.html
87+
```
88+
89+
Set the contents to:
90+
91+
```
92+
This is the test platform for QGIS' wcs client. You can use these services
93+
from QGIS directly (to try out WCS for example) by pointing your QGIS to:
94+
http://wcs.qgis.org/1.9.0/wcs
95+
```
96+
97+
98+
== Now deploy it ==
99+
100+
```
101+
sudo mkdir /var/log/apache2/wcs_qgis.org
102+
sudo chown www-data /var/log/apache2/wcs_qgis.org
103+
cd /etc/apache2/sites-available/
104+
sudo ln -s /var/www/wcs/7-wcs.qgis.org.conf .
105+
cd /var/www/wcs/
106+
sudo a2ensite 7-wcs.qgis.org.conf
107+
sudo /etc/init.d/apache2 reload
108+
```
109+
110+
== Debugging ==
111+
112+
```
113+
sudo tail -f /var/log/apache2/wcs_qgis.org/error.log
114+
```

0 commit comments

Comments
 (0)