Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)
« Configurer iipimage » : différence entre les versions
| Ligne 68 : | Ligne 68 : | ||
=== Virtual hosts === | === Virtual hosts === | ||
Il vous faudra un hote virtuel pour gérer votre projet a placer dans {{path|/etc/apache2/sites-enabled/}}. | Il vous faudra un hote virtuel pour gérer votre projet a placer dans {{path|/etc/apache2/sites-enabled/}}. | ||
<syntaxhighlight lang="apache" highlight=" | <syntaxhighlight lang="apache" highlight="13-15"> | ||
<VirtualHost *:80> | <VirtualHost *:80> | ||
ServerAdmin elopez+projet@ajlsm.com | ServerAdmin elopez+projet@ajlsm.com | ||
| Ligne 74 : | Ligne 74 : | ||
ServerName projet.dev | ServerName projet.dev | ||
AddDefaultCharset utf-8 | AddDefaultCharset utf-8 | ||
| Ligne 86 : | Ligne 85 : | ||
ProxyPassReverse /cgi-bin/iipsrv.fcgi http://localhost/iipsrv/iipsrv.fcgi | ProxyPassReverse /cgi-bin/iipsrv.fcgi http://localhost/iipsrv/iipsrv.fcgi | ||
# | # Redirige toutes les requetes sur la racine vers tomcat | ||
ProxyPass / | ProxyPass / ajp://localhost:8009/projet-sous-tomcat | ||
ProxypassReverse / | ProxypassReverse / ajp://localhost:8009/projet-sous-tomcat | ||
# Log file | # Log file | ||
Version du 7 mars 2013 à 13:43
Voir la documentation IIPimage officielle pour la procédure d'installation du serveur.
Installation
Ubuntu 12.04
Un paquet existe, mais il n'est pas présent dans les dépots officiels pour cette version. Il est disponible sur la page détaillant l'installation.
sudo apt-get install libfcgi0ldbl libmemcached6
cd /tmp/
wget http://downloads.sourceforge.net/project/iipimage/IIP%20Server/iipsrv-0.9.9/iipimage-server_0.9.9-0ubuntu12.04_amd64.deb?r=http%3A%2F%2Fiipimage.sourceforge.net%2F2012%2F05%2Fnew-debian-and-ubuntu-packages-released%2F&ts=1362648274&use_mirror=freefr -O iipimage-server_0.9.9-0ubuntu12.04_amd64.deb
sudo dpkg -i ./iipimage-server_0.9.9-0ubuntu12.04_amd64.deb
Ubuntu, toutes versions
Il est nécessaire d'avoir apache 2 avec module fastcgi.
sudo apt-get install apache2 libapache2-mod-fastcgi
On activera les modules suivants :
sudo a2enmod fastcgi iipsrv
Configuration apache
Configuration du module IIPsrv
ScriptAlias /fcgi-bin/ "/usr/lib/cgi-bin/"
ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin/"
# Set the options on that directory
#<Directory "/fcgi-bin/">
<Directory "/usr/lib/cgi-bin/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
<Directory "/cgi-bin/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
# Set the handler
AddHandler fastcgi-script fcg fcgi fpl
# Initialise the FCGI server - set some default values
FastCgiServer /usr/lib/cgi-bin/iipsrv.fcgi \
-initial-env LOGFILE=/var/log/iipsrv.log \
-initial-env VERBOSITY=5 \
-initial-env JPEG_QUALITY=50 \
-initial-env MAX_IMAGE_CACHE_SIZE=10 \
-initial-env MAX_CVT=3000 \
-initial-env MEMCACHED_SERVERS=localhost
Virtual hosts
Il vous faudra un hote virtuel pour gérer votre projet a placer dans /etc/apache2/sites-enabled/.
<VirtualHost *:80>
ServerAdmin elopez+projet@ajlsm.com
ServerName projet.dev
AddDefaultCharset utf-8
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# IIPimage server
ProxyPass /cgi-bin/iipsrv.fcgi http://localhost/iipsrv/iipsrv.fcgi
ProxyPassReverse /cgi-bin/iipsrv.fcgi http://localhost/iipsrv/iipsrv.fcgi
# Redirige toutes les requetes sur la racine vers tomcat
ProxyPass / ajp://localhost:8009/projet-sous-tomcat
ProxypassReverse / ajp://localhost:8009/projet-sous-tomcat
# Log file
ErrorLog ${APACHE_LOG_DIR}/error-projet.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access-projet.log combined
# Watch the rewrite rules (0: off, 9: plenty of details)
RewriteLogLevel 9
RewriteLog ${APACHE_LOG_DIR}/rewrite-projet.log
</VirtualHost>
Les lignes suivantes redirige les requêtes de la visionneuse vers le serveur IIP-image. On les placera avant les proxyPass de Apache Tomcat.
ProxyPass /cgi-bin/iipsrv.fcgi http://localhost/cgi-bin/iipsrv.fcgi
ProxyPassReverse /cgi-bin/iipsrv.fcgi http://localhost/cgi-bin/iipsrv.fcgi
Résolution de problème
[Fri Dec 07 14:58:51 2012] [warn] proxy: No protocol handler was valid for the URL /cgi-bin/iipsrv.fcgi. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
sudo a2enmod proxy proxy_http
(cf. <ref>ReverseProxy : No protocol handler was valid for the URL</ref>)
Références
<references/>