Topic: iRedMail Nextcloud 16
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.99
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu 18.04.02
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hey there,
I think I'm going a bit nuts. lol I've been trying many different NGINX configuration files to get Nextcloud working on the same server as iRedmail, but under a different sub-domain. What ever I try nothing seems to work, although the most basic config does work but doesn't add a lot to securing NC.
My current NC NGINX config is:
<code>
server {
listen 80;
listen [::]:80;
root /opt/www/nextcloud;
index index.php index.html index.htm;
server_name nextcloud.server.domain;
location / {
rewrite ^ /index.php$uri;
}
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
return 404;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
return 404;
}
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
location ~ ^/(?:updater|ocs-provider)(?:$|/) {
try_files $uri $uri/ =404;
index index.php;
}
location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
access_log off;
}
}
</code>
This document is saved in /etc/nginx/sites-enabled as nextcloud.conf
The problem with this particular configuration is that whenever I type in the URL http://nextcloud.server.domain/ I'm redirected to https://nextcloud.server.domain/mail/.
I'm not able to spot the issue here, I hope someone else sees it and can point me in the right direction.
Any help would be much appreciated.
Cheers...
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.