HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Plugins/Modules/Addons (http://www.howtoforge.com/forums/forumdisplay.php?f=34)
-   -   Roundcube, ISPConfig, Nginx (http://www.howtoforge.com/forums/showthread.php?t=60428)

onastvar 4th February 2013 10:11

Roundcube, ISPConfig, Nginx
 
Hi,

I've decided to try roundcube instead of squirrelmail. Installed Roundcube in subfolder /webmail under domain1.com (/var/www/clients/client0/web1/web/webmail/) webmail is currently accessible via http://domain1.com/webmail/

I can login with any email account and it works fine. I'm trying to find out how can I make it available under other domains.

1) Right now I can only access webmail via http://domain1.com/webmail/
I'd like to make it accessible via http://webmail.domain1.com

2) I cannot access webmail under other domains

http://domain2.com/webmail/
http://domain3.com/webmail/
http://domain4.com/webmail/

I'm not sure how to make this work. I know it's possible. Do I need to add code to NGINX Directives under each site? Anyone have similar setup, please advise?

Thank You!

pititis 5th February 2013 00:39

You can install roundcube using the apps vhost, so every user can access roundcube (or everything you install there) in this way:

domain1.com:8081/roundcube
domain2.com:8081/roundcube

Software installed in the apps directory /var/www/apps must be owned by the user and group ispapps

Please note that /var/www/apps is the location in debian/ubuntu and I can't assume the location in centos for example.

Another option is create the subdomain webmail for each domain and redirect it to the desired location.

Cheers!

onastvar 5th February 2013 07:44

That approach worked - Thank You Pititis!

onastvar 14th February 2013 19:31

When I go to subdomain http://webmail.mydomain.com
everything works fine as soon as RoundCube loads I see this in my URL

http://mydomain.com:8081/roundcube/index.php

How could I setup http://webmail.mydomain.com to display all the time, when I am in my webmail (roundcube)?

Ovidiu 14th February 2013 22:10

I'm very much interested in this too. Currently I use this nginx location:

Quote:

location /webmail {
root /var/www/;
index index.php index.html index.htm;
location ~ ^/webmail/(.+\.php)$ {
try_files $uri =404;
root /var/www/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_scrip$
include /etc/nginx/fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
location ~* ^/webmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|t$
root /var/www/;
}
}
BUT I need to have a subdomain webmail pointing to /var/www/webmail for the simple reason that for most of my domains use CloudFlare (the free version which doesn't support HTTPS) and so I can't enable HTTPS for domain.tld only for i.e. webmail.domain.tld and bypass CloudFlare for that subdomain.

Any ideas on how to do this with ISPCFG3+nginx?

falko 15th February 2013 19:59

Create a new vhost (webmail.example.com) and add your directives to the nginx directives field. Inside the location block, you add

Code:

root /var/www/webmail;

Ovidiu 16th February 2013 09:28

Thanks, I created a new vhost called webmail.example.com and used this location and so far I haven't found any problems with it :-)

Quote:

location / {
root /var/www/webmail/;
index index.php index.html index.htm;
location ~ ^/(.+\.php)$ {
try_files $uri =404;
root /var/www/webmail/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
location ~* ^/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /var/www/webmail/;
}
}

onastvar 19th February 2013 07:27

Thanks! That also worked perfectly in my environment.


All times are GMT +2. The time now is 00:17.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.