I've made an asp.net core application and I'm trying to host it in Apache with reverse proxy. The app uses cookie authentication:
AuthenticationScheme = "CookieAuthentication",
LoginPath = new PathString("/Account/Login/"),
AccessDeniedPath = new PathString("/Account/Forbidden/"),
AutomaticAuthenticate = true,
AutomaticChallenge = true
In httpd.conf I would like to use one SSL only host with custom port which serves content from Kestrel.
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
SSLProtocol all -SSLv3
When I use url https://testserver1:34567 it redirects to http://testserver1:34567/Account/Login/?ReturnUrl=%2F which of course gives a Bad Request. If I correct the url by changing it to https, everything works fine afterwards.
How can I make it so that it always redirects to a https url?
At the moment I try to get running a ASP.Net Core Application on my server. This server runs Debian 8, Apache 2 and Plesk 12. The Application runs at port 5000 and I wanted to add a reverse proxy to a specific subdomain to make the application available outside.
I have created a subdomain and added additional configuration as follows:
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/
When using this, I only get an error of the server when browsing stating
The server encountered an internal error or misconfiguration and was
unable to complete your request.
I searched Stackoverflow, ASP.Net Core documentation and other forums, which actually state to use my config (or a subset of this). Installing nginx is not an option because of other projects running on this server.
Do you have an idea what I am missing?
Thanks for your help!
I have a .NET Core application ready to deploy. I've already tested this application on my Linux (CentOS) server with the command:
and everything is running smothly. Now I want to publish this web application on my Apache server. So far I've runned the command
which created a folder named netcoreapp1.0. I've moved that folder to the var/www/mywebsite folder and created the respective sites-enabled and sites-avaliable conf files. The problem is I cannot access application at all.
With this, I would like to know if there is anyone out there that had published a .NET Core application into an Apache server in order to give some tutorial on how they did it.