Welcome! Log In Create A New Profile

Advanced

Nginx alias or root migrate from apache

Posted by photographer 
Nginx alias or root migrate from apache
July 27, 2014 06:01AM
Hi,

Could you help me write nginx config for roundcube?

I have configured location as below and as result scripts path is /var/lib/roundcube/webmail/info.php should be /var/lib/roundcube/info.php

How to should configure for have `fastcgi param: "SCRIPT_FILENAME: /var/lib/roundcube/info.php"`

```
location /webmail {
alias /var/lib/roundcube;
index index.php index.html index.htm;
try_files $uri =404;
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;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
```

```
2014/07/27 09:49:14 [debug] 6175#0: *1 trying to use file: "/info.php" "/var/lib/roundcube/info.php"
2014/07/27 09:49:14 [debug] 6175#0: *1 cached open file: /var/lib/roundcube/info.php, fd:20, c:1, e:0, u:1
2014/07/27 09:49:14 [debug] 6175#0: *1 http script var: "/var/lib/roundcube/info.php"
2014/07/27 09:49:14 [debug] 6175#0: *1 fastcgi param: "SCRIPT_FILENAME: /var/lib/roundcube/info.php"
2014/07/27 09:49:14 [debug] 6175#0: *1 http script var: "/var/lib/roundcube"
2014/07/27 09:49:14 [debug] 6175#0: *1 fastcgi param: "DOCUMENT_ROOT: /var/lib/roundcube"
2014/07/27 09:49:14 [debug] 6175#0: *1 http script var: "/var/lib/roundcube"
2014/07/27 09:49:14 [debug] 6175#0: *1 fastcgi param: "SCRIPT_FILENAME: /var/lib/roundcube/webmail/info.php"
2014/07/27 09:49:14 [debug] 6175#0: *1 close cached open file: /var/lib/roundcube/info.php, fd:20, c:0, u:1, 0
```
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready