1

Topic: running a php site on the same server with the same domain name.

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): iRedMail-1.5.2
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Alma8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I have read that it is possible to host domains on iRedMail server by adding a conf file to the /etc/nginx/sites-available/, but I dont want it to be like a stand alone blog site.

I am more interested in running something like listmonk or mautic or matomo or BIMI

So fore example mail.domain . com redirects to roundcube
And mail.domain . com/iredadmin redirects to admin dashboard.

What do I need to have in the conf file to make mail.domain . com/mautic to redirect to a php site that is in /var/www/html/mautic

also when I place a info.php with the <?php phpinfo(); ?> into /var/www/html/mautic
It just shows blank page. How do I make it work with this configuration of Nginx?

Thank you.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: running a php site on the same server with the same domain name.

you can just bchange the base folder in there where the sitename is the . com section that links to the domain's dns. you can even add a new one that will point to another folder withanother domain name. The thingbs you put in therfe would depend on if yuou erquirfe ssl or just plain html. you could ad one like this for example if you have a letsencrypt folder and in your cloudflare dns specify strict ssl where the certificate is loaded from your server and isnt the generic cloudflare one.


this will catch the default http request and forward it as https on your server with higher ssl protocols and the root section is wherfeyou put wherfe you want nginx to look for your website to load up. This config is to be used along with apache its an nginx one from serverpilot.

3

Re: running a php site on the same server with the same domain name.

Found the solution.

4

Re: running a php site on the same server with the same domain name.

I ended up using the subdomain.