Score:0

This site can’t be reached

ua flag

I am on Ubuntu hosting a .NET 6 web app. If I go to the directory where the publish files are stored and run command dotnet webapp.dll, then I will get something like the output below (Then if I go to the browser and look at the website example.com, the webapp displays fine)

Feb 09 20:52:15 ubuntu dotnet-webapp[2687]:       Now listening on: http://localhost:5000
Feb 09 20:52:15 ubuntu dotnet-webapp[2687]:       Application started. Press Ctrl+C to shut down.
Feb 09 20:52:15 ubuntu dotnet-webapp[2687]: info: Microsoft.Hosting.Lifetime[0]
Feb 09 20:52:15 ubuntu dotnet-webapp[2687]:       Hosting environment: Production

But if I create a service and enable it, I see that the output above displays if I run the command: sudo journalctl -fu webapp.service However, example.com says "This site can’t be reached" Would like some help please.

Config file:

<VirtualHost *:80>
   ServerName company.com
   ServerAdmin admin.com
   DocumentRoot /var/www/company.com
   ProxyPreserveHost On  
   ProxyPass / http://localhost:5000/ 
   ProxyPassReverse / http://localhost:5000/  
   RewriteEngine on  
   RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]  
   RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]  
   RewriteRule /(.*) ws://127.0.0.1:5000/$1 [P]  
   ErrorLog ${APACHE_LOG_DIR}/error-company.com.log  
   CustomLog ${APACHE_LOG_DIR}/access-company.com.log combined  
</VirtualHost>
David avatar
cn flag
What version of Ubuntu? Desktop or Server?
DavidJS avatar
ua flag
Ubuntu 20.04 on a Raspberry PI. Port 80 is opened and I have a proxy for port 80 to http://localhost:5000. ( I added my config file to my question description)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.