Error 500 on ProxyPass

Discussion in 'Installation/Configuration' started by francoisPE, Nov 20, 2020.

  1. francoisPE

    francoisPE Member HowtoForge Supporter

    I setup ubuntu20.04 + ispc.
    I setup a signaling server for nextcloud. It is working. I can access to it through http://myIP:8000/. Nextcloud recognize and connect to it.
    curl -i
    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    Server: nextcloud-spreed-signaling/920x0de12d5128f8e88617679
    Date: Fri, 20 Nov 2020 17:05:59 GMT
    Content-Length: 94

    I want SSL connection : I try to setup "proxypass" with ispconfig.
    I create a site, attached an LE cert, redirect for https and redirect "www->domain.tld". I test it : it goes to "default web page" and is 'https'.
    then, next, I "Enable PROXY Protocol"
    In my shell, I also "a2enmod proxy_wstunnel", it seems useless
    I add following directives in ispc apache directives
    # Enable proxying Websocket requests to the standalone signaling server.
    ProxyPass "/" "ws://myIP:8000/"
    #RewriteEngine On # already 'on' because of above rewrite rules
    # Websocket connections from the clients.
    RewriteRule ^/spreed$ - [L]
    # Backend connections from Nextcloud.
    RewriteRule ^/api/(.*) http://myIP:8000/api/$1 [L,P]
    curl -i
    HTTP/1.1 500 Internal Server Error
    Date: Fri, 20 Nov 2020 16:58:51 GMT
    Server: Apache
    Content-Length: 665
    Connection: close
    Content-Type: text/html; charset=iso-8859-1

    <title>500 Internal Server Error</title>
    <h1>Internal Server Error</h1>
    <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p>
    <p>Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.</p>
    <p>More information about this error may be available in the server error log.</p>
    <p>Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.</p>

    I review error.log, syslog, etc... impossible to understand from where it is coming.
    Any visible mistake ? Any idea to help ?
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    If check the webserver and php error logs, just post what shows up for your request if you can't make sense of it, but that's the first place to look for 500 errors.
  3. francoisPE

    francoisPE Member HowtoForge Supporter

    php is not active on my site because unused...
    The only thing I found out after doing : curl -i
    It's in other_vhosts_access.log 'IPv6':fbd - - [21/Nov/2020:16:32:51 +0100] "GET /api/v1/welcome HTTP/1.1" 500 5096 "-" "curl/7.68.0"
    I don't understand 5096. Don't know if can help !
    I find nothing else except connections stopped by ufw and fail2ban from almost everywhere around the world !
  4. francoisPE

    francoisPE Member HowtoForge Supporter

    I am thinking about incompatible rewrite rules...
    between the one written by isp and
    What do you think ?
  5. francoisPE

    francoisPE Member HowtoForge Supporter

  6. francoisPE

    francoisPE Member HowtoForge Supporter

    Finally it works.
    Not sure why ?
    I manually modify vhost file. I remove everything except <Virtual myIP:443>
    I uncomment RewriteEngine on
    service reload, restart
    And now, it works... even with ispconfig !

Share This Page