Linux serverlinux web serverNETWORK ADMINISTRATIONS

Linux (Basics): 4 of 4 – Configure Apache as reverse proxy to host .Net Core WebAPI on Linux Ubuntu

In this video, I demo how to put everything together, configure Apache as a reverse proxy, deploy ASP.Net Core 3.1 WebAPI to host on Linux Ubuntu 18.04 and connect to MySQL database. This is video 4 of 4 videos. (Below at the end is a full list of what this video covers.)

There will be 4 videos in this series:
1. Install/configure MySQL on Linux Ubuntu 18.04 (https://youtu.be/PVkFbnoh6vA)
2. Configure MySQL on Linux Ubuntu 18.04 and connect from Windows (https://youtu.be/e4yGAOtGmWs)
3. Develop Asp.Net Core 3.1 WebAPI connecting to MySQL database
4. Deploy, release and test Asp.Net Core 3.1WebAPI on Apache on Linux Ubuntu 18.04 (https://youtu.be/WUAhKhWgsIg)

Link to all the code: https://github.com/charlesbill/TheSolutionArchitect/tree/linuxbasics-dev

If you want, you can also support me on Patreon: https://www.patreon.com/thesolutionarchitect

This video covers the following:
1. Install DotNet Core Runtime Libraries and Dotnet SDK on Linux
2. Install and configure Apache 2
3. Configure Firewall Settings UFW
4. Install OpenSSH
5. Configure Apache on sites-available
6. Make some code changes for port forwarding
7. Copy Files from Windows to Linux using FileZilla
8. Run a Release on Linux
9. Install Supervisor
10. Configure and copy files to the /var/www folder
11. Create config file on Supervisor for you web API
12. Test web API on Linux (localhost)
13. Test web API on Postman from Windows 10 PC

source

by The Solution Architect

linux web server

10 thoughts on “Linux (Basics): 4 of 4 – Configure Apache as reverse proxy to host .Net Core WebAPI on Linux Ubuntu

  • This is brilliant! Please do this exact series word for word but for NGINX instead of apache, you are helping the community a lot!

  • Thank you for such a great tutorial.
    Encountered 404 not found "The requested URL was not found on this server" when send GET request from Postman on my windows 10 (the url is: "http://linux_IP/controller"). There is no issue when GET request is made locally on Linux machine. Default apache page is accessible just fine from windows browser.
    Please advise.
    Thank you.

  • thanks for the tut. Im missing the startup.cs file.

  • Aweson, How can I do for keeping in contact with you?

  • Well, I got stucked on Supervisor config. It looks like once updated it does not allow supervisor to start. Update: Found the issue – there was a problem with logging setup – if the folder does not exist it says there's no directory. Still, not managed to run the app – encountered another error: The user's home directory could not be determined. Set the 'DOTNET_CLI_HOME' environment variable to specify the directory to use.

  • Finally someone who knows about this scenario! Thanks man, great content 😀 just by curiosity, do you know how to change the port to something different than 5000 and .UseKestrel() along with Apache?

  • Awesome guide…clear and straightforward language. I followed the guide and got the error "(exit status 1; not expected)" trying to start supervisor. I also see that on the application log file under /var/www/<app-name>/log/ there is a message "The user's home directory could not be determined. Set the 'DOTNET_CLI_HOME' environment variable to specify the directory to use." Would you help please…

  • Awesome guide, most complete and descriptive guide to this process. Although I'm having some issues, the same issues as posted by this guy here https://serverfault.com/questions/1023102/how-to-troubleshoot-an-apache-reverse-proxy . Was hoping to wake up to solution but his question got locked. I am having the same issue, I can see my .net program at localhost:5000 but not 80. Just get a 404. Apache is not forwarding the request or something? Do you have any more advice for troubleshooting this? Thanks a lot for reading this, anything is appreciated.

  • I got stuck on: "sudo apt-get install aspnetcore-runtime-3.1" I get a "the following packages have unmet dependencies" and then I try to install the dependency (dotnet-runtime-3.1) but it keeps failing same error with new dependencies. It seems I am doing something wrong, it seems it doesn't make sense installing those tree of dependencies one by one

  • did you really just uploaded this?? crazy, I'm watching it right now : )

Comments are closed.