Greetings, all around!
I have one issuie with nginx and display roundcube under -> https://webmail.domain.com.
At the moment I have fixed only the part for https://webmail.domain.com/roundcube/ <- like this roundcube page is loaded and works as it should.
I have followed the instruction from here: https://help.directadmin.com/item.php?id=560
But now I`m struggling to make roudcube work directly -> https://webmail.domain.com
First I have setup only webserver=apache to see my apache config (virtual_host2.conf.post and virtual_host2_secur.conf.post) is working without nginx and it did (worked with http://webmail.domain.com and https://webmail.domain.com).
After I have changed to webserver=nginx_apache (added two new configs: nginx_server.conf.post and nginx_server_secure.conf.post), without SSL -> http://webmail.domain.com it works.
With SSL https://webmail.domain.com it displays default hosting panels page.
The nginx_server_secure.conf.post:
It seems the problem is in routing, but I can figure it out.
Any help would be appreciated!
Thank you!
I have one issuie with nginx and display roundcube under -> https://webmail.domain.com.
At the moment I have fixed only the part for https://webmail.domain.com/roundcube/ <- like this roundcube page is loaded and works as it should.
I have followed the instruction from here: https://help.directadmin.com/item.php?id=560
But now I`m struggling to make roudcube work directly -> https://webmail.domain.com
First I have setup only webserver=apache to see my apache config (virtual_host2.conf.post and virtual_host2_secur.conf.post) is working without nginx and it did (worked with http://webmail.domain.com and https://webmail.domain.com).
After I have changed to webserver=nginx_apache (added two new configs: nginx_server.conf.post and nginx_server_secure.conf.post), without SSL -> http://webmail.domain.com it works.
With SSL https://webmail.domain.com it displays default hosting panels page.
The nginx_server_secure.conf.post:
Code:
|?DOCROOT=`HOME`/domains/`DOMAIN`/private_html|
|?REALDOCROOT=`HOME`/domains/`DOMAIN`/private_html|
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|
server
{
listen |IP|:|PORT_443| ssl|SPACE_HTTP2|;
|MULTI_IP|
server_name mail.|DOMAIN|;
root /var/www/html/roundcube;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/|DOMAIN|.log;
access_log /var/log/nginx/domains/|DOMAIN|.bytes bytes;
error_log /var/log/nginx/domains/|DOMAIN|.error.log;
ssl_certificate |CERT|;
ssl_certificate_key |KEY|;
|*if HAVE_PHP1_FPM="1"|
# use fastcgi for all php files
location ~ \.php$
{
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/nginx_limits.conf;
if (-f $request_filename)
{
fastcgi_pass unix:/usr/local/php|PHP1_RELEASE|/sockets/webapps.sock;
}
root /var/www/html/roundcube;
index index.php index.html index.htm;
}
|*endif|
|*if HAVE_NGINX_PROXY="1"|
location /
{
# access_log off;
proxy_buffering |PROXY_BUFFERING|;
proxy_pass https://127.0.0.1:|PORT_8081|;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Accel-Internal /nginx_static_files;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /nginx_static_files/
{
# access_log /var/log/nginx/access_log_proxy;
root /var/www/html/roundcube/;
internal;
}
|*endif|
# deny access to apache .htaccess files
location ~ /\.ht
{
deny all;
}
}
It seems the problem is in routing, but I can figure it out.
Any help would be appreciated!
Thank you!