Nginx als reverse proxy to apache2.2

Discussion in 'Installation/Configuration' started by muekno, May 27, 2021.

  1. muekno

    muekno Member HowtoForge Supporter

    I have a multiserver ISPConfig installation with a webserver running nginx. and I have an older stand allone mailsystem with a webmail running apache2-2.2.12-1.38.2 on SuSE with self signed certificate not reachable from the internet.
    So I like to reach it via a reverse proxy.
    I created a website with ISPConfig on the web server running ngnix and secured it with let's encrypt. Works fine so long. Automatic redirection from http to https works too.
    But what have i to write to the nginx Directives on the options page to make it a reverse proxy.
    Searching now for hours on the net here and anywhere but can not find a real solution.
    nginx as proxy before apache is recommended many times but can't find a sample.
    need hint or link to solution

    Thanks
    Rainer,
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    There is a proxy redirect type in the website settings which i should handle that (I've never used it myself).
     
  4. muekno

    muekno Member HowtoForge Supporter

    more than 400 pages of tutorial are not usefull, sorry
     
  5. muekno

    muekno Member HowtoForge Supporter

    Sorry can't find that, my you be a little bit more clear, thanks
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The redirect settings are on the redirect tab of the website.
     
  7. muekno

    muekno Member HowtoForge Supporter

    Thanks but what I want is a reverse proxy, no simple redirektion.
    so to get near I created a simple hello world website on the apache
    and a nginx directive
    [location / {
    proxy_pass http://my_server.mydomian.tld;
    }]
    that works
    than I modified it instead of my_server ... to my internal mediawiki on the same server
    that fails with a 403 as nginx seam to search the pass localy instead of passing it to the backend server, I can not understand why
    while accessing the mediawiki direct works fine
    Again what I need is a working sample for a reverse proxy with nginx
    Thanks for help
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    And that's what the option 'Proxy' which you can select there is doing.
     
    muekno likes this.
  9. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    This is a false statement. Not only there are tutorial, there also threads discussing the same and they do work.
     
  10. muekno

    muekno Member HowtoForge Supporter

    OK some things are easier than expected
    but still problem with ssl. It works with the simple hello world and a self signed cert but with the webmail app on the older server I get 502 and error like below
    [*2 SSL_do_handshake() failed (SSL: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small) while SSL handshaking]
    on apache there are directives to ignore such problems, whats on nginx

    Thanks
     

Share This Page