[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapserver-users
Subject:    [mapserver-users] mapserver/mapcache apache+nginx
From:       Sebastiano Laini <Sebastiano.Laini () BuchananComputing ! co ! uk>
Date:       2019-02-28 11:06:50
Message-ID: 369ebfd44a434e1d8a5e0fca3e0be657 () BCExchange ! BuchananComputing ! co ! uk
[Download RAW message or body]

Hi all,

Following the maximum speed I can get from mapcache, I'm going to make some test in a \
new server with Nginx as a reverse proxy and Apache. How stable is mapcache 1.6.1 \
with Nginx and how should I setup mapcache.

I know there are instruction but I don't understand some points.

https://www.mapserver.org/mapcache/install.html#nginx-specific-instructions

this are the instruction to build my actual setup

cd /usr/local/src/
wget http://download.osgeo.org/mapserver/mapcache-1.6.1.tar.gz
tar -xzvf mapcache-1.6.1.tar.gz
rm -f mapcache-1.6.1.tar.gz
cd mapcache-1.6.1
mkdir build
cd build
cmake   -DCMAKE_PREFIX_PATH="usr/bin/sqlite3" \
        -DWITH_SQLITE=1 \
        -DWITH_BERKELEY_DB=0 \
        -DWITH_TIFF=0 \
        -DWITH_GEOTIFF=0 \
        -DWITH_FCGI=0 \
        -DWITH_PCRE=0 \
        ../

Run make and then make install:

make
make install
sudo ldconfig

I add this to the httpd.conf:

LoadModule mapcache_module    modules/mod_mapcache.so

<IfModule mapcache_module>
                              <Directory /usr/local/src/mapcache-1.6.1>
                              Require all granted
               </Directory>
                              MapCacheAlias /mapcache \
"/usr/local/src/mapcache-1.6.1/build/mapcache.xml" </IfModule>

And then I copy my mapcache.xml in the build directory and:

sudo ldconfig
service httpd restart


If I want to use Nginx as a reverse proxy and speed up the cache I need to build it \
from scratch as in the instruction and change the configuration to use mapcache with \
Nginx? Or still you will use both of them? Can I use yum install nginx and then add \
the module?

The part about The basic configuration without any proxying.... Where should be put? \
In the mapcache.xml?


Is there any particular apache and Nginx config that I should use?
My apache configuration is the default one in Plesk (at the moment mpm event)  and in \
the test server (mpm prefork as they told me that it's better, though it's using the \
default configuration)

Thanks,

Sebastiano Laini
Web Developer


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Following the maximum speed I can get from mapcache, I&#8217;m \
going to make some test in a new server with Nginx as a reverse proxy and \
Apache.<o:p></o:p></p> <p class="MsoNormal">How stable is mapcache 1.6.1 with Nginx \
and how should I setup mapcache.<o:p></o:p></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">I know there are \
instruction but I don&#8217;t understand some points.<o:p></o:p></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p \
class="MsoNormal">https://www.mapserver.org/mapcache/install.html#nginx-specific-instructions<o:p></o:p></p>
 <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">this are the instruction to build my actual setup<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><i>cd /usr/local/src/<o:p></o:p></i></p>
<p class="MsoNormal"><i>wget \
http://download.osgeo.org/mapserver/mapcache-1.6.1.tar.gz<o:p></o:p></i></p> <p \
class="MsoNormal"><i>tar -xzvf mapcache-1.6.1.tar.gz</i><o:p></o:p></p> <p \
class="MsoNormal">rm -f <i>mapcache-1.6.1.tar.gz</i><o:p></o:p></p> <p \
class="MsoNormal"><i>cd mapcache-1.6.1<o:p></o:p></i></p> <p \
class="MsoNormal"><i>mkdir build<o:p></o:p></i></p> <p class="MsoNormal"><i>cd \
build<o:p></o:p></i></p> <p class="MsoNormal"><i>cmake&nbsp;&nbsp; \
-DCMAKE_PREFIX_PATH=&quot;usr/bin/sqlite3&quot; \<o:p></o:p></i></p> <p \
class="MsoNormal"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DWITH_SQLITE=1 \
\<o:p></o:p></i></p> <p \
class="MsoNormal"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DWITH_BERKELEY_DB=0 \
\<o:p></o:p></i></p> <p \
class="MsoNormal"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DWITH_TIFF=0 \
\<o:p></o:p></i></p> <p \
class="MsoNormal"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DWITH_GEOTIFF=0 \
\<o:p></o:p></i></p> <p \
class="MsoNormal"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DWITH_FCGI=0 \
\<o:p></o:p></i></p> <p \
class="MsoNormal"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DWITH_PCRE=0 \
\<o:p></o:p></i></p> <p \
class="MsoNormal"><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
../</i><o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Run make and then make install:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><i>make<o:p></o:p></i></p>
<p class="MsoNormal"><i>make install<o:p></o:p></i></p>
<p class="MsoNormal">sudo ldconfig<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I add this to the httpd.conf:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt">LoadModule \
mapcache_module&nbsp;&nbsp;&nbsp; modules/mod_mapcache.so<o:p></o:p></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal" \
style="text-indent:36.0pt">&lt;IfModule mapcache_module&gt;<o:p></o:p></p> <p \
class="MsoNormal">&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;Directory /usr/local/src/mapcache-1.6.1&gt;<o:p></o:p></p> <p \
class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Require all granted<o:p></o:p></p> <p class="MsoNormal">&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&lt;/Directory&gt;<o:p></o:p></p> <p class="MsoNormal">&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
MapCacheAlias /mapcache \
&quot;/usr/local/src/mapcache-1.6.1/build/mapcache.xml&quot;<o:p></o:p></p> <p \
class="MsoNormal" style="text-indent:36.0pt">&lt;/IfModule&gt;<o:p></o:p></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">And then I copy my \
mapcache.xml in the build directory and:<o:p></o:p></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">sudo \
ldconfig<o:p></o:p></p> <p class="MsoNormal"><i>service httpd \
restart<o:p></o:p></i></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">If I want to use Nginx as a reverse proxy and speed up the cache \
I need to build it from scratch as in the instruction and change the configuration to \
use mapcache with Nginx? Or still you will use both of them? Can I use yum install \
nginx  and then add the module?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The part about <span \
style="font-size:9.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#3E4349;background:white">
 The basic configuration without any proxying&#8230;. Where should be put? In the \
mapcache.xml?<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:9.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#3E4349;background:white"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:9.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#3E4349;background:white"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:9.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#3E4349;background:white">Is \
there any particular apache and Nginx config that I should use?<o:p></o:p></span></p> \
<p class="MsoNormal"><span \
style="font-size:9.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#3E4349;background:white">My \
apache configuration is the default one in Plesk (at the moment mpm event) &nbsp;and \
in the test server (mpm prefork as they told me that it&#8217;s better,  though \
it&#8217;s using the default configuration)<o:p></o:p></span></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span \
style="color:#1F497D;mso-fareast-language:EN-GB">Sebastiano \
Laini<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="color:#1F497D;mso-fareast-language:EN-GB">Web Developer<o:p></o:p></span></p> \
</div> </body>
</html>


[Attachment #4 (unknown)]

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic