Apache2 as SSLProxy for ASP.NET Core 2.0 application hosted on Kestrel

by cs9112   Last Updated January 09, 2018 11:00 AM

I have dotnet core 2.0.3 application which is hosted on Kestrel. Service running fine over http, but I was setup SSL certificate and, can't access to page (503 error):

https://mypage.com/services/Service.asmx (before, over http was fine)

https://mypage.com/test.xml (it's ok - I can access from webbrowser)

I have apache setup:

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
            ServerAdmin [email protected]
            DocumentRoot /var/www/html
            ...
            SSLEngine on
            SSLProxyEngine On
            ProxyRequests off
            Loglevel debug
            ...
            SSLCertificateFile      /etc/ssl/sslkey/mypage.com.crt
            SSLCertificateKeyFile   /etc/ssl/sslkey/mypage.com.key
            ...
             BrowserMatch "MSIE [2-6]" \
                            nokeepalive ssl-unclean-shutdown \
                            downgrade-1.0 force-response-1.0

            <Location "/services/Service.asmx">
                    Allow from all
                    Order allow,deny
                    ProxyPass http://127.0.0.1:5000/Service.asmx
                    ProxyPassReverse http://127.0.0.1:5000/Service.asmx
                    SetOutputFilter DEFLATE
                    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
                    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
            </Location>
    </VirtualHost>

I can access to content of webservice from: curl http://127.0.0.1:5000/Service.asmx



Related Questions


Install local CA on Windows

Updated January 07, 2018 13:00 PM

HTTPS is over 50 times slower then HTTP

Updated February 21, 2017 01:00 AM


Apache SSL Handshake Slow

Updated December 01, 2016 08:00 AM

Redirecting my site is not working.

Updated November 30, 2015 20:00 PM