Roundcube (and previously Nginx SSL Cert) always fails to install

I’m having problems with MIAB, as it always fails at the setup part where Nginx must install. I think its something to do with ssl_cert.
here is my logs:
Primary Hostname: ------------------
Public IP Address: ----------------
Mail-in-a-Box Version: v0.44

Updating system packages…
Installing system packages…
Initializing system random number generator…
Firewall is active and enabled on system startup
Installing nsd (DNS server)…
Installing Postfix (SMTP server)…
Installing Dovecot (IMAP server)…
Installing OpenDKIM/OpenDMARC…
Installing SpamAssassin…
Installing Nginx (web server)…

FAILED: service nginx restart

Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.

when I type systemctl status nginx.service, this is what I get:

nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-04-06 15:17:51 EDT; 2min 10s ago
Process: 18054 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 24165 (code=exited, status=0/SUCCESS)

Apr 06 15:17:51---------- systemd[1]: Starting A high performance web server and a reverse proxy server…
Apr 06 15:17:51 ----------- nginx[18054]: nginx: [emerg] “ssl_ciphers” directive is duplicate in /etc/nginx/conf.d/ssl.conf:4
Apr 06 15:17:51 ------------ nginx[18054]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 06 15:17:51 -------------- systemd[1]: nginx.service: Control process exited, code=exited status=1
Apr 06 15:17:51 --------------- systemd[1]: nginx.service: Failed with result ‘exit-code’.
Apr 06 15:17:51 --------------- systemd[1]: Failed to start A high performance web server and a reverse proxy server.

This is my ssl.conf, found in /etc/nginx/conf.d/ssl.conf:

We track the Mozilla “intermediate” compatibility TLS recommendations.

Note that these settings are repeated in the SMTP and IMAP configuration.

ssl_protocols has moved to nginx.conf in bionic, check there for enabled protocols.

ssl_dhparam /home/user-data/ssl/dh2048.pem;

ssl_session_cache shared:SSL:50m;
ssl_session_timeout 1d;

Buffer size of 1400 bytes fits in one MTU.

nginx 1.5.9+ ONLY

ssl_buffer_size 1400;

ssl_stapling on;
ssl_stapling_verify on;
resolver valid=86400;
resolver_timeout 10;

Please Help

Did you do a fresh ubuntu 18.04 install? In other cases, it won’t work.

Yes I did, Nothing should be interfering with the Nginx installation

And did you install on a VPS with public IP or behind some nat device (which also should be working).

Whats the result when you run nginx -T (which tests the current config).

Sorry for the late reply, here is what happens when I run nginx -T:

nginx: [emerg] “ssl_ciphers” directive is duplicate in /etc/nginx/conf.d/ssl.conf:4
nginx: configuration file /etc/nginx/nginx.conf test failed

I also don’t have a nat or anything blocking my server

What is the output of nginx -v and sudo nginx -t ? Oops missed it from earlier.

Also, who is your VPS provider? @Noamboy123

Here is my output for nginx -v

nginx version: nginx/1.14.0 (EasyEngine)

My VPS provider is OVH, VPS 2018 SSD 3. It comes with 8gb of ram and 80gb of storage.

Okay, I got through the Nginx boss, but it turns out that it was just a mini-boss.

Roundcube is my next challenge.

Just for everyone else having trouble with Nginx, just comment out all SSL settings in nginx.conf.

Here is my dialogue for Roundcube:

Installing Roundcube (webmail)…
PHP Fatal error: Uncaught Error: Call to undefined function mb_internal_encoding() in /usr/local/lib/roundcubemail/program/lib/Roundcube/bootstrap.php:86
Stack trace:
#0 /usr/local/lib/roundcubemail/program/include/iniset.php(62): require_once()
#1 /usr/local/lib/roundcubemail/program/include/clisetup.php(25): require_once(’/usr/local/lib/…’)
#2 /usr/local/lib/roundcubemail/bin/ require_once(’/usr/local/lib/…’)
#3 {main}
thrown in /usr/local/lib/roundcubemail/program/lib/Roundcube/bootstrap.php on line 86

I have enabled MBstring everywhere I could find, but it still doesn’t work

Just to confirm, Is OVH using a custom image of Ubuntu 18.04 (server edition)? Did you install any other application when you ordered the server?

The reason you’re getting so many weird questions is that it looks like MIAB is on a weird distro. Normally on a fresh 18.04 setup, things just kind of work.

1 Like

You should NOT be having these problems. Some providers just have a bad image of Ubuntu … I don’t know if that is what is happening here, but I am going to point a finger at the provider … or you didn’t start with an absolutely clean install of Ubuntu 18.04 LTS server edition. But I’m quite sure that you have already said that you did.

1 Like

I did do somethings to make it personalized to my liking like installing Apache2 first and MySQL. That probably messed things up. I will try to do a fresh reinstall to fix most errors.

This is exactly why you are having these issues. You MUST start with a completely FRESH install of Ubuntu 18.04 LTS server edition.
Apache cannot run alongside of nginx, nor is MySQL able to be used in the configurations used by MiaB.

If you want to do things to your liking, they need to be done on a different vps independent of MiaB. Also, how many users do you expect to have … your specs may be WAY overkill for this…

1 Like

I use this server for lots of stuff, mostly for game servers. I am going to backup everything and then put it all back once I first install MIAB.

MIAB is designed to run on a server by itself. Not saying you CAN’T run it along side other things, but in general, you create a lot more headaches trying to cram more stuff onto the box.

I highly recommend against this. MiaB is designed to be run all alone on a stand alone VPS. You can get a VPS from great providers for as low as $3.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.