Score:0

Setting up iRedmail in parallele with web server

za flag

I already have a web server installed with nginx, and I can access it by visiting https://skwal.net/

I would like to access iRedMail applications under https://skwal.net/mail/(iredadmin for example)

Here is what I tried :

server { 
    listen 8080;
    server_name skwal.net;
    return 301 https://$server_name$request_uri;
}

server {
    listen 8443 ssl;
    server_name skwal.net;

    error_page 503 /maintenance.html;
    
    location /maintenance.html {
        root /home/skwal/skwal-net-v2/extra/;
        internal;
    }

    location /static/ { 
        alias /home/skwal/skwal-net-v2/static/;
    }

    location / {
        if (-f /home/skwal/skwal-net-v2/hooks/maintenance) {
            return 503;
        }
        proxy_pass http://127.0.0.1:8000;
    }

    ssl_certificate /etc/letsencrypt/live/skwal.net/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/skwal.net/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


    location /mail/ {
        proxy_pass http://127.0.0.1:9000;
    }
}

server {
    listen 127.0.0.1:9000;
    server_name _;
    
    root /var/www/html;
        index index.php index.html;
        include /etc/nginx/templates/misc.tmpl;
        include /etc/nginx/templates/ssl.tmpl;
        include /etc/nginx/templates/iredadmin.tmpl;
        include /etc/nginx/templates/roundcube.tmpl;
        include /etc/nginx/templates/sogo.tmpl;
        include /etc/nginx/templates/netdata.tmpl;
        include /etc/nginx/templates/php-catchall.tmpl;
        include /etc/nginx/templates/stub_status.tmpl;
}

I have my own server at home and all incoming requests are redirected to port 8080 or 8443 of my server.

I think this should work but I always get this error :

nginx: [emerg] no port in upstream "php_workers" in /etc/nginx/templates/fastcgi_php.tmpl:13
nginx: configuration file /etc/nginx/nginx.conf test failed
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.