[英]How to setup nginx for roundcube in ispconfig server?
Hello im working on school project, I installed ISPConfig which configured nginx server and it works, now I want to enable roundcube webmail. 您好,我正在学校项目上工作,我安装了ISPConfig,该服务器配置了nginx服务器,它可以工作,现在我要启用roundcube webmail。 Im running ubuntu so I used apt-get
我正在运行ubuntu,所以我使用apt-get
apt-get install roundcube roundcube-plugins roundcube-plugins-extra
The wizard configured my MySQL database for roundcube and install roundcube web files to /usr/share/roundcube and in /var/lib/roundcube I have links to /usr/share/roundcube. 该向导将我的MySQL数据库配置为roundcube,并将roundcube Web文件安装到/ usr / share / roundcube,在/ var / lib / roundcube中,我具有到/ usr / share / roundcube的链接。
Now I need to tell nginx if someone request URL myispconfig.tld/webmail it open roundcube. 现在,我需要告诉nginx是否有人请求URL myispconfig.tld / webmail来打开roundcube。 But I'm not sure how to do this, maybe some alias or creating vhost ?
但是我不确定如何做到这一点,也许是一些别名或创建vhost? I can configure apache but I'm new in nginx.
我可以配置apache,但是我是nginx的新手。 I read roundcube documentation so next configuration I think I can handle.
我阅读了roundcube文档,因此我认为可以处理下一个配置。 Thank you
谢谢
edit: i tried add to /etc/nginx/sites-available/ispconfig.vhost 编辑:我试图添加到/etc/nginx/sites-available/ispconfig.vhost
location /webmail/ {
alias /usr/share/roundcube/;
}
but after nginx reload no changes :P 但是在nginx重新加载后没有任何变化:P
SOLVED: same configuration for squirrelmail works :-) 解决:squirrelmail作品相同的配置:-)
location /roundcube {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/roundcube/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
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;
# To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) mu$
#fastcgi_pass 127.0.0.1:9000;
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;
}
location ~* ^/roundcube/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
location ~* /.svn/ {
deny all;
}
location ~* /README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ {
deny all;
}
}
Note: Debian users should change "root /usr/share/;" 注意:Debian用户应更改“ root / usr / share /;”。 with "root /var/lib/;"
用“ root / var / lib /;” throughout the configuration file (there are three places).
整个配置文件(共有三个位置)。 Else they will get an 404 error as whatermark.
否则,他们将得到404错误作为whatermark。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.