ISPCONFIG Migration to new server with autoinstaller. Mail issues

Discussion in 'Installation/Configuration' started by vestport, Nov 12, 2025 at 2:01 AM.

  1. vestport

    vestport Member

    After migration mail accounts appear in ispconfig contol panel but can't bring anything up when I http://mail.mysite.com or even with the :8081. Something is wrong. Not sure what version it installs. I think postfix and roundcube but not sure how to track this down, test and fix the issue. I just don't want to start loosing mail now that the server is back online

    Error is "403 forbidden" by nginx


    ISPCONFIG is reporting the following:

    Web-Server: Online
    SMTP-Server: Online
    POP3-Server: Online
    IMAP-Server: Online
    DNS-Server: Online
    mySQL-Server: Online

    So not sure why I can't http to mail

    I think all this happened because I tried to go from apache to nginx. I probably should not have tried to migrate and just used the new system and manually added? If anyone can help me bail out of this it would be greatly appreciated. I don't mind doing all my websites over. Not much there but mail is a big issue. Some sites work and some don't. If I delete websites and re-create they seem to work okay but mail is out to lunch.




    Thanks!


    Art
     
    Last edited: Nov 12, 2025 at 2:50 AM
  2. remkoh

    remkoh Active Member HowtoForge Supporter

    Last edited: Nov 12, 2025 at 1:38 PM
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Try deleting you apps.vhost and force update ISPConfig for it to be reconfigured with the default that came with it.
     
  4. vestport

    vestport Member

    Yes, 404 error
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    No. This issue is not related to the migration at all. Its an issue that you somehow did not have webmail installed. No big deal, you can install it later at any time. But you probably should not have switched from Apache to Nginx, unless you know Nginx well. Nginx and Apache are not fully compatible, so switching from Apache to Nginx can be done, but it requires that you create rules for every site that uses custom rules or .htaccess files.

    That's to be expected when switching from Apache to Nginx. You must create proper rules for the sites, e.g. when they use WordPress.

    So what's your mail issue? You have not posted any errors yet. Webmail or RoundCube is not your mail system, its just a webmail client, so like Outlook but with a web GUI. Your mail system is Postfix, Dovecot, rspamd. If you have an issue with your mail system, then please post the error that you get in the mail.log file.
     
    ahrasis likes this.
  6. vestport

    vestport Member

    I did get mail to work by using https: or http://mysite:8081/webmail. As you said some sites worked and some did not. It's been a real battle here. I am getting lots of errors with sites now and can no longer get the ispconfig control panel to work anymore. Errors like: "server" directive is not allowed here in /etc/nginx/sites-enabled" and "invalid parameter "R,L" in /etc/nginx/sites-enabled" (I believe this one is from apache migration to nginx). I did read about replacing these and got everything working before with a new lines that were more nginx friendly but I can't find that page anymore. I couldn't get ispconfig control panel to load initially until I change 2 of the virtual host file that were getting this error. Now I can't load the control panel any longer. I think it was because I updated/upgraded from the command line and then restarted the ngnix. I think it updated debian as well and that's when things really went bad.

    At this point I am willing to just manually re-create all my sites and email accounts. Ideally I would like to salvage anything I can. My question is can I remove ISPconfig completely, re-install it with NGINX (even though I came from apache) and not loose my mail for each user? If not then I am pretty screwed or may have to try another 2 day migration from apache to apache. I will need to setup a whole new system, migrate from apache to apache and spend lots of time importing or merging mail. I really don't know what else to do.

    Like Till hinted towards, migrating from apache to nginx is probably the issue with much of this. My hope was just to update to a faster web server but in the end all I did was cause myself lots of pain. I think should ultimately be running NGINX unless you think that's not a good plan? Maybe another option is just to remove nginx and reinstall apache? I am just grabbing at straws at this point. Please help!!!!!
     
    Last edited: Nov 12, 2025 at 4:00 PM
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    If you migrate, just migrate normally, make sure all things working just fine as it is before. From there, make copy(ies) to test conversion to nginx, which is not so difficult as I mentioned earlier. Until your nginx trial works, you can keep trying. Though I mentioned steps that sounds simple, it is actually that simple if you grab and execute them right. Good luck!
     
  8. vestport

    vestport Member

    My previous apache server was working fine. I guess I didn't realize that the migration tool would not handle this conversion. It wouldn't be that bad but not having access to the ISPCONFIG control panel any longer is a problem, Not sure how to make peace with the /etc/nginx/sites-enabled files that are of issue to get this going again. Also, the fear is if I ever update the server again that this will only happen again because things are written for both apache and nginx.
     
  9. remkoh

    remkoh Active Member HowtoForge Supporter

    Delete all symlinks of your websites in /etc/nginx/sites-enabled and try to get nginx going with the control panel.
    Then you can disable all websites properly in ispconfig and fix them one by one.
     
    ahrasis and till like this.
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The Migration hadles the conversion of files written and managed by ISPConfig. But it can not read the source code of all your installed websites to anlyze it and create matching Nginx directives for custom configs.

    Nginx is a special software, and while you can basically run any software that you can run on Apache, you must know how to write custom configs for your sites. It is only useful if you know it well. If you do not know it, then it makes no sense to use it.

    You should consider contacting Thom from ISPConfig business support and get a quote for cleaning up your system: https://www.ispconfig.org/get-support/?type=ispconfig
     
  11. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Then make a copy/copies of it and use the copy for your trial.
    Nobody says it will.
    May be, but you can fix it first, if you want.
    Just remove all apache2 traces install via apt, and ISPConfig, when calibrated, won't detect nor use it, so it will only uses nginx.

    To be frank, when I did my migration it was Ubuntu 16, 10 years ago, but I do not think that it has too much different nowadays.
     
  12. vestport

    vestport Member

    Okay, I deleted the apps.vhost for each site and forced ispconfig update. That got me going again, many thanks! I am having issue with trying to make the subdomain "mail" under ispconfig "subdomains" point to https://mysite.com:8081/webmail but it won't work. Here is the file and not sure what I am doing wrong but it seems like ispconfig is setting this up wrong from a default config file somewhere. Here is what I have that does not work below:

    server {
    listen *:80;
    listen [::]:80;




    server_name mail.mysite.com;

    location ^~ /.well-known/acme-challenge/ {
    access_log off;
    log_not_found off;
    root /usr/local/ispconfig/interface/acme/;
    autoindex off;
    index index.html;
    try_files $uri $uri/ =404;
    }
    location / {
    rewrite ^ https://www.mysite.com:8081/webmail$request_uri? redirect;
    }
    }


    The rewrite is not working. Not sure what I can do about that but if I can get by this so ISPCONFIG sets up things right for subdomains I think I would be okay.

    I noticed in the ISPCONFIG control panel that under SUBDOMAINS that a couple of them have "R,L (Temporary redirect + last rule) even though the pull down options below do not include that. Something in one of the defaults is causing this I'm sure even though I forced the update.

    Can't get subdomains to work properly


    Thanks!

    Art
     
    Last edited: Nov 12, 2025 at 8:48 PM

Share This Page