1

Topic: Adding Apache Support After Initial Install

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubunti 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Want Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

How do I go about setting up Apache support after setting up iRedMail initially?  The set up script did not list Apache as a web server option (just nginx) so I selected not to install a web server.  Everything has been set up and is working fine... I would now like to enable the iRedadmin and also allow for webmail use....

So, how can I install Apache support?

Thanks,

Brent Warkentin

2

Re: Adding Apache Support After Initial Install

Unless you plan on hosting more than mail on your iredmail instance why not just install nginx. Zhang has the nginx configuration pretty modular and is easy to work with.

-Ron

3

Re: Adding Apache Support After Initial Install

rrosson wrote:

Unless you plan on hosting more than mail on your iredmail instance why not just install nginx. Zhang has the nginx configuration pretty modular and is easy to work with.

-Ron

Ok so do I re-run the install script or is the install done with manual run apt-get commands?

Thanks,

Brent Warkentin

4

Re: Adding Apache Support After Initial Install

Add lines below in file "iRedMail-0.9.8/config", then re-run the install script.

export WEB_SERVER='NGINX'
export USE_IREDADMIN='YES'
export USE_ROUNDCUBE='YES'

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5 (edited by jbobier 2018-07-25 15:36:05)

Re: Adding Apache Support After Initial Install

rrosson wrote:

Unless you plan on hosting more than mail on your iredmail instance why not just install nginx. Zhang has the nginx configuration pretty modular and is easy to work with.

-Ron

What should we do if we do run a small site with several domains and services (including Apache) and want to use iRedMail because it looks amazing?

6 (edited by selea 2018-07-25 19:15:58)

Re: Adding Apache Support After Initial Install

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName mail.domain.se
        ServerAdmin admin@domain.se
        ServerAlias sub.domain.se
        DocumentRoot /var/www/html
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
        Header set Content-Secure-Policy "default-src 'self'; upgrade-insecure-requests;"
        #Include conf-available/serve-cgi-bin.conf
Alias /iredadmin/static "/opt/www/iredadmin/static/"
WSGIScriptAlias /iredadmin "/opt/www/iredadmin/iredadmin.py/"
Alias /mail "/opt/www/roundcubemail/"
Alias /rainloop "/opt/www/rainloop/"
Alias /awstats/icon "/usr/share/awstats/icon/"
Alias /awstatsicon "/usr/share/awstats/icon/"
ScriptAlias /awstats "/usr/lib/cgi-bin/"
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

SSLCertificateFile /etc/rapidssl/certificate.crt
SSLCertificateKeyFile /etc/rapidssl/certificate.key
SSLCACertificateFile /etc/rapidssl/rapidssl.2018.crt
</VirtualHost>

</IfModule>

This is my apache config, adapt it to your needs

And yes, I do agree that it is sad that apache support is dropped by iRedmail. Apache and Nginx is comparable when it comes to performance if you are using Apache2.4 with prefork. Apache is also easier (atleast for me) to configure and maintain.

7

Re: Adding Apache Support After Initial Install

selea wrote:
...

This is my apache config, adapt it to your needs

And yes, I do agree that it is sad that apache support is dropped by iRedmail. Apache and Nginx is comparable when it comes to performance if you are using Apache2.4 with prefork. Apache is also easier (atleast for me) to configure and maintain.

Awesome! Thanks, that will save me a bunch of searching around for files. The other idea that I had was just to configure Nginx to run on a different port. Seems kind of redundant to run another web server just for iredmail, but maybe that it is easier in the long run.

8

Re: Adding Apache Support After Initial Install

It may be easier to setup the server in this order:

- Setup new server and install iRedMail
- Setup your website

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

9

Re: Adding Apache Support After Initial Install

It may be easier to setup the server in this order:

- Setup new server and install iRedMail
- Setup your website

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

10

Re: Adding Apache Support After Initial Install

selea wrote:
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName mail.domain.se
        ServerAdmin admin@domain.se
        ServerAlias sub.domain.se
        DocumentRoot /var/www/html
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
        Header set Content-Secure-Policy "default-src 'self'; upgrade-insecure-requests;"
        #Include conf-available/serve-cgi-bin.conf
Alias /iredadmin/static "/opt/www/iredadmin/static/"
WSGIScriptAlias /iredadmin "/opt/www/iredadmin/iredadmin.py/"
Alias /mail "/opt/www/roundcubemail/"
Alias /rainloop "/opt/www/rainloop/"
Alias /awstats/icon "/usr/share/awstats/icon/"
Alias /awstatsicon "/usr/share/awstats/icon/"
ScriptAlias /awstats "/usr/lib/cgi-bin/"
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

SSLCertificateFile /etc/rapidssl/certificate.crt
SSLCertificateKeyFile /etc/rapidssl/certificate.key
SSLCACertificateFile /etc/rapidssl/rapidssl.2018.crt
</VirtualHost>

</IfModule>

This is my apache config, adapt it to your needs

And yes, I do agree that it is sad that apache support is dropped by iRedmail. Apache and Nginx is comparable when it comes to performance if you are using Apache2.4 with prefork. Apache is also easier (atleast for me) to configure and maintain.

I'm fairly new to iRedMail or any server-based item whatsoever. I had apache2 already running with a website and web app serving. I was in dire need of an email service package so I do not run into installing the MTA, MUA... individually, ended up installing iRedMail neglecting the documentation.

Now, I have Nginx and Apache running side by side and none serving what I expect them to serve. How can I completely remove Nginx (to avoid further server complication) and configure iRedMail 1.2.1 to run with the existing Apache 2 web server? It seems like this post is the closest I can get to, but I still need clearer step-by-step instructions to pull this off.

Sorry for giving life to this post, but I'm in some mess in my production server sad

11

Re: Adding Apache Support After Initial Install

Better run iRedMail on a dedicate server for mail service only.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

12

Re: Adding Apache Support After Initial Install

ZhangHuangbin wrote:

Better run iRedMail on a dedicate server for mail service only.

I realized that now. What is the best way to uninstall iRedMail so I can deal with it in a dedicated server?

13

Re: Adding Apache Support After Initial Install

Unfortunately, you have to remove related softwares and their data and config files manually.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee