Mudanças entre as edições de "Foswiki no Nginx"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
(Criou página com 'roda <source lang="bash"> wget -c http://technotes.1000lines.net/fastcgi-wrapper.pl /usr/bin/spawn-fcgi -f /usr/bin/php5-cgi -s /var/run/php5-cgi.socket -P /var/run/spawn-fcgi.pi...')
 
m
 
(Uma revisão intermediária pelo mesmo usuário não está sendo mostrada)
Linha 49: Linha 49:
 
* http://sys-notes.com/bin/view/Main/NginxFoswiki
 
* http://sys-notes.com/bin/view/Main/NginxFoswiki
 
* http://www.sys-notes.com/bin/view/Main/NginxFastCGI
 
* http://www.sys-notes.com/bin/view/Main/NginxFastCGI
 +
* http://packages.debian.org/unstable/main/fcgiwrap
 +
* http://stackoverflow.com/questions/369850/how-can-i-run-perl-scripts-using-fastcgi-on-nginx
 +
* http://redmine.lighttpd.net/projects/spawn-fcgi
 +
* http://blog.oddeven.info/nginx-perl-fastcgi-how-to/
 +
* http://blackonsole.org/perl-fastcgi-on-nginx/
 +
* http://library.linode.com/web-servers/nginx/perl-fastcgi/fedora-13
 +
 +
[[Categoria:Servidor]]

Edição atual tal como às 06h13min de 10 de novembro de 2012

roda

wget -c http://technotes.1000lines.net/fastcgi-wrapper.pl
/usr/bin/spawn-fcgi -f /usr/bin/php5-cgi -s /var/run/php5-cgi.socket -P /var/run/spawn-fcgi.pid -C 5 -u www-data -g www-data
cd /var/www/Foswiki/bin; sudo -u www-data ./foswiki.fcgi -n 5 -l /var/run/nginx/foswiki.sock -p /var/run/foswiki.pid -d
        set $foswiki_root "/var/www/foswiki";
        location /foswiki {
                root /var/www/foswiki;
                index index.html; # should be changed after installation
        }
        location /foswiki/bin/configure {
                allow 127.0.0.1; # localhost, you may want to omit due to security considerations.
                allow 192.168.12.12; # you management host if you have one
                deny all;
                gzip off;
                fastcgi_pass   unix:/var/run/nginx/perl-cgi.sock;
                fastcgi_split_path_info ^/foswiki(/bin/configure)(?:\.pl)?(.*);
                fastcgi_param  SCRIPT_FILENAME  $foswiki_root$fastcgi_script_name;
                fastcgi_param  PATH_INFO $fastcgi_path_info;
                include fastcgi_params;
        }
        location /foswiki/bin/ {
                gzip off;
                fastcgi_pass   unix:/var/run/nginx/foswiki.sock;
                fastcgi_split_path_info ^(\w+)(?:\.pl)?(.*);
                fastcgi_param  SCRIPT_FILENAME  $foswiki_root$fastcgi_script_name;
                fastcgi_param  PATH_INFO $fastcgi_path_info;
                fastcgi_param  SCRIPT_NAME  $fastcgi_script_name;
                fastcgi_param  PATH_TRANSLATED $foswiki_root$fastcgi_path_info;
                include fastcgi_params;
        }
        location ~ (^/lib|^/data|^/locale|^/templates|^/tools|^/work) {
                deny all;
        }
        if ($http_user_agent ~ ^SiteSucker|^iGetter|^larbin|^LeechGet|^RealDownload|^Teleport|^Webwhacker|^WebDevil|^Webzip|^Attache|^SiteSnagger|^WX_mail|^EmailCollector|^WhoWhere|^Roverbot|^ActiveAgent|^EmailSiphon|^CrownPeak-HttpAgent|^$) {
                rewrite .* /404.html break;
        }

add a redirect to the Main web:

rewrite ^/foswiki/?$ http://yousite.com/foswiki/bin/view.pl/Main permanent;

referência: