On 07/23/12 21:52, Tomas Doran wrote:
On 23 Jul 2012, at 08:48, Alex Povolotsky wrote:

Hello,

I'm setting up MojoMojo, https-protected.

However, it keeps making http: urls.

Setting X-Forwarded-Port did not help a bit, and trying to grep 
X-Forwarded-Port to 443 did not help as well.

I've set fastcgi_param HTTPS 1, and it helps, but why X-Forwarded-Port is 
mentioned but does not work?

Your post implies that your running the app as an FCGI, however you're caring 
about X-Forwarded headers, which are only relevant if you're running the app 
behind a proxy.

Which (or both) of these are you specifying?

Can you show us your web server config, and app config?


Yes, FCGI

=== nginx.conf ===
    server {
       listen       443;
       server_name  wiki.example.com;

       ssl                  on;
       ssl_certificate      dev.crt;
       ssl_certificate_key  dev.key;

       ssl_session_timeout  5m;

       ssl_protocols  SSLv2 SSLv3 TLSv1;
       ssl_ciphers  HIGH:!aNULL:!MD5;
       ssl_prefer_server_ciphers   on;

        location /static {
                 root /usr/local/share/mojomojo/root;
        }
        location / {
                 proxy_set_header X-Forwarded-Port 443;
                 include fastcgi_params;
                 client_max_body_size 128m;
                 proxy_read_timeout 600;
                 proxy_connect_timeout 600;
                 fastcgi_param HTTPS 1; # Only this line helps
                 fastcgi_pass  unix:/tmp/.mojomojo.socket;

        }
        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/local/www/nginx-dist;
        }
    }

=== mojomojo.conf ===
name  MojoMojo
using_frontend_proxy 1
# other settings are 100% irrelevant to FCGI

=== run script ===
#!/bin/sh
exec setuidgid www envdir ./env /usr/local/bin/mojomojo_fastcgi.pl -l /tmp/.mojomojo.socket -n 4 -e --proc_title MojoMojo


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to