Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 642ed27a7f
Fetching contributors…

Cannot retrieve contributors at this time

138 lines (115 sloc) 4.963 kB
#
# Copyright 2010 Micah Altman, Michael McDonald
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This file is part of The Public Mapping Project
# https://github.com/PublicMapping/
#
# Purpose:
# publicmapping.apache is an Apache HTTP configuration file.
#
# This file configures the web server to serve up The Public Mapping
# Project out of /, and configures a django WSGI application. In
# addition, the static media for the django web application is
# served up through a set of aliased paths.
#
# Author:
# Andrew Jennings, David Zwarg
#
<IfDefine !nobuilder>
<VirtualHost *:80>
ServerAdmin AzaveaDev@azavea.com
WSGIDaemonProcess geodjango user=www-data group=www-data processes=10 threads=1 display-name=publicmapping
WSGIProcessGroup geodjango
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /projects/PublicMapping/DistrictBuilder/django/publicmapping.wsgi
Alias /static-media/ /projects/PublicMapping/DistrictBuilder/django/publicmapping/static-media/
<Directory /projects/PublicMapping/DistrictBuilder/django/publicmapping/static-media>
Order deny,allow
Allow from all
</Directory>
Alias /reports/ /projects/PublicMapping/local/reports/
<Directory /projects/PublicMapping/local/reports/>
Options Indexes FollowSymLinks
Order deny,allow
Allow from all
</Directory>
Alias /sld/ /projects/PublicMapping/DistrictBuilder/sld/
<Directory /projects/PublicMapping/DistrictBuilder/sld/>
Options Indexes
Order deny,allow
Allow from all
</Directory>
Alias /docs/ /projects/PublicMapping/DistrictBuilder/docs/html/
<Directory /projects/PublicMapping/DistrictBuilder/docs/html/>
Options Indexes
Order deny,allow
Allow from all
</Directory>
Alias /data/ /projects/PublicMapping/local/
<Directory /projects/PublicMapping/local/>
Options Indexes
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/publicmapping-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/publicmapping-access.log combined
RewriteEngine On
# This redirects report requests to an alternate port.
RewriteRule ^/reporting/getreport/$ http://localhost:8081/getreport/ [NC,P]
# You can comment out this rewriterule and adjust your map server name accordingly to stop proxying
# map requests through apache
RewriteRule /geoserver/(.*) http://%{HTTP_HOST}:8080/geoserver/$1 [NC,P]
RewriteLog /var/log/apache2/publicmapping-rewrite.log
RewriteLogLevel 0
</VirtualHost>
</IfDefine>
<IfDefine !noreporting>
<IfDefine nobuilder>
# All traffic on port 80 should be redirected to the reporting port
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*) http://%{HTTP_HOST}:8081$1 [R,L]
</VirtualHost>
</IfDefine>
# Necessary to keep rPy2 from throwing exceptions
WSGIRestrictStdout Off
# This virtual host is responsible for running a multithreaded environment for reports
NameVirtualHost *:8081
Listen 8081
<VirtualHost *:8081>
ServerAdmin AzaveaDev@azavea.com
WSGIDaemonProcess bard-reports user=www-data group=www-data processes=1 threads=1 display-name=publicmapping-reports
WSGIScriptAlias / /projects/PublicMapping/DistrictBuilder/django/reports.wsgi
WSGIProcessGroup bard-reports
WSGIApplicationGroup bard-reports
ErrorLog /var/log/apache2/bard-reporting-error.log
CustomLog /var/log/apache2/bard-reporting-access.log combined
LogLevel warn
# This virtual host needs a longer timeout because of reports
Timeout 600
# These requests are proxied through the secure server. Non-local access forbidden.
<IfDefine !nobuilder>
<Directory />
Order deny,allow
Deny from all
Allow from 127.0.0.1/16
</Directory>
</IfDefine>
</VirtualHost>
</IfDefine>
Jump to Line
Something went wrong with that request. Please try again.