[rt-users] rt3.8.17 / 4.2.6 / nginx and document-root '/rt'

Torsten Brumm tbrumm at mac.com
Wed Jan 14 02:51:48 EST 2015


Wow, thanks! It's next in Quere here.

Von meinem iPhone gesendet

> Am 14.01.2015 um 08:43 schrieb Daniel Schwager <Daniel.Schwager at dtnet.de>:
> 
> Hi all,
> 
>> thanks for this information - there's the fix - important
>> lines are "location" and "rewrite" - see (1).
> 
> I updated to rt 4.2.6 - now, the combination of rt / nginx / fastcgi / document-root '/rt' does not work again.
> 
> My goal is to map a RT with nginx to a URL like "http://www.domain.de:8080/rt" (instead of "http://www.domain.de:8080")
> 
> Tonight, I played around and found the following working setup:
> 
> /etc/nginx/conf.d/rt4.conf
> 
> server {
> 
>    listen       8080;
>    server_name  host.domain.de;
>    root /tmp;
> 
>    # /opt/rt4/etc/RT_SiteConfig.pm                                                                                                                                                                                                          
>    #   Set($WebDomain, "host.domain.de");                                                                                                                                                                                                   
>    #   Set($WebPort , 8080);                                                                                                                                                                                                                
>    #   Set($WebPath , "/rt");                                                                                                                                                                                                               
>    #   Set(@ReferrerWhitelist, qw(extranet.domain.de:443 host.domain.de:8080 ));                                                                                                                                                            
> 
>    #                                                                                                                                                                                                                                        
>    #                                                                                                                                                                                                                                        
>    #                                                                                                                                                                                                                                        
>    location  / {
> 
>        ### <original /etc/nginx/fastcgi_params - debian 7.x>                                                                                                                                                                                
>        # include         /etc/nginx/fastcgi_params;                                                                                                                                                                                         
>          fastcgi_param QUERY_STRING            $query_string;
>          fastcgi_param REQUEST_METHOD          $request_method;
>          fastcgi_param CONTENT_TYPE            $content_type;
>          fastcgi_param CONTENT_LENGTH          $content_length;
> 
>          fastcgi_param SCRIPT_FILENAME         $request_filename;
>          fastcgi_param SCRIPT_NAME             $fastcgi_script_name;
>          fastcgi_param REQUEST_URI             $request_uri;
>          fastcgi_param DOCUMENT_URI            $document_uri;
>          fastcgi_param DOCUMENT_ROOT           $document_root;
>          fastcgi_param SERVER_PROTOCOL         $server_protocol;
> 
>          fastcgi_param GATEWAY_INTERFACE       CGI/1.1;
>          fastcgi_param SERVER_SOFTWARE         nginx/$nginx_version;
> 
>          fastcgi_param REMOTE_ADDR             $remote_addr;
>          fastcgi_param REMOTE_PORT             $remote_port;
>          fastcgi_param SERVER_ADDR             $server_addr;
>          fastcgi_param SERVER_PORT             $server_port;
>          fastcgi_param SERVER_NAME             $server_name;
> 
>          fastcgi_param HTTPS                   $https;
> 
>          # PHP only, required if PHP was built with --enable-force-cgi-redirect                                                                                                                                                             
>          fastcgi_param REDIRECT_STATUS         200;
>        ### </original /etc/nginx/fastcgi_params>                                                                                                                                                                                            
> 
>        fastcgi_pass   unix:/opt/rt4/var/fastcgi.sock;
> 
>        fastcgi_param   SCRIPT_NAME "/rt";
>        fastcgi_param   PATH_INFO $uri;
> 
>     }
> 
> }
> 
> 
> rt-server.fcgi was called like this:
>    /opt/rt4/sbin/rt-server.fcgi --pidfile=/opt/rt4/var/fastcgi.pid --socket=/opt/rt4/var/fastcgi.sock 2> /dev/null
> 
> 
> Maybe, I can help other admins in the future not to spend that much time searching for a working solution.
> 
> regards
> Danny
> 
> 
> 
> 
> 



More information about the rt-users mailing list