Created
November 17, 2014 21:12
-
-
Save nextstopsun/daf09cdc55298864d619 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from logging.config import fileConfig | |
import os.path | |
fileConfig(r'/home/nl/mapproxy/basemaps_log.ini', {'here': os.path.dirname(__file__)}) | |
from mapproxy.wsgiapp import make_wsgi_app | |
application = make_wsgi_app(r'/home/nl/mapproxy/basemaps.yaml') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[loggers] | |
keys=root,source_requests | |
[handlers] | |
keys=mapproxy,source_requests | |
[formatters] | |
keys=default,requests | |
[logger_root] | |
level=INFO | |
handlers=mapproxy | |
[logger_source_requests] | |
level=INFO | |
qualname=mapproxy.source.request | |
# propagate=0 -> do not show up in logger_root | |
propagate=0 | |
handlers=source_requests | |
[handler_mapproxy] | |
class=FileHandler | |
formatter=default | |
args=(r"/home/nl/mapproxy/mapproxy.log", "a") | |
[handler_source_requests] | |
class=FileHandler | |
formatter=requests | |
args=(r"/home/nl/mapproxy/source-requests.log", "a") | |
[formatter_default] | |
format=%(asctime)s - %(levelname)s - %(name)s - %(message)s | |
[formatter_requests] | |
format=[%(asctime)s] %(message)s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost | |
192.168.0.103 | |
; | |
access_log /home/nl/nginx/nginx_access.log; | |
error_log /home/nl/nginx/nginx_error.log; | |
location /bm | |
{ | |
uwsgi_pass unix:///run/uwsgi/app/bm.socket; | |
include uwsgi_params; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Script-Name /kktiles; | |
# uwsgi_buffers 8 128k; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uwsgi> | |
<uid>www-data</uid> | |
<gid>www-data</gid> | |
<plugin>python</plugin> | |
<socket>/run/uwsgi/app/bm.socket</socket> | |
<chmod-socket>666</chmod-socket> | |
<pythonpath>/home/nl/mapproxy/</pythonpath> | |
<app mountpoint="/"> | |
<script>/home/nl/mapproxy/basemaps.py</script> | |
</app> | |
<master/> | |
<processes>4</processes> | |
<harakiri>3600000</harakiri> | |
<reload-mercy>8</reload-mercy> | |
<cpu-affinity>1</cpu-affinity> | |
<stats>/run/uwsgi/app/stats.socket</stats> | |
<max-requests>2000</max-requests> | |
<limit-as>512</limit-as> | |
<reload-on-as>256</reload-on-as> | |
<reload-on-rss>192</reload-on-rss> | |
<no-orphans/> | |
<vacuum/> | |
</uwsgi> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment