douchengfei3985 2013-12-18 00:32
浏览 180

Nginx + php-fpm上的Roundcube

I am running a VPS server with Centos and Plesk. The server is working right, on a Nginx + php-fpm setup.

So, websites are served correctly, but when user tries to access to its webemail ( roundcube tool installed ), doesn't work.

My current nginx conf for webmail is :

server {
    listen [my server ip...]:80;
    server_name webmail.* roundcube.webmail.* horde.webmail.* atmail.webmail.*;

   client_max_body_size 20m;
   client_body_buffer_size 128k;
   proxy_read_timeout 90;


location / {
               root /usr/share/psa-roundcube;
               index index.php index.html index.htm;

    location ~ \.php$ 
               {    
                        fastcgi_pass unix:/tmp/php5-fpm.sock;
                        fastcgi_param SCRIPT_FILENAME $request_filename;
                        include /etc/nginx/fastcgi_params;
                    fastcgi_keep_conn on;
            fastcgi_split_path_info       ^(.+\.php)(.*)$;
        }
        }
}

What can be wrong?

  • 写回答

1条回答 默认 最新

  • dongyu7074 2014-04-02 03:27
    关注

    This snippet works for me on CentOS 6.5. The SCRIPT_FILENAME is different and the is fastcgi_index is present. Think that's it.

    location ~ \.php$ {
        try_files $uri =404;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/tmp/php5-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_index index.php;
    }
    

    I have copied it from here and it works. The other directives in this particular example are very worth to get noticed/copied to harden the plesk setup just a little.

    评论

报告相同问题?

悬赏问题

  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺