first check the service is ok. if the code is using host headers use postman or curl and set the headers.
[http://127.0.0.1:5000;]
you can also check the system log to be sure you have the correct port.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello, I am trying to deploy an ASP.NET CORE API on a linux server with nginx, I have already managed the publishing stage in visual studio and I have placed the published folders in var/www
then i configured the etc/nginx/site_available/default file like this
then i created a kestrel of my project in etc/systemd/system
[Unit] Description=Example .NET Web API App running on Linux [Service] WorkingDirectory=/var/www/helloapp ExecStart=/usr/bin/dotnet /var/www/helloapp/helloapp.dll Restart=always # Restart service after 10 seconds if the dotnet service crashes: RestartSec=10 KillSignal=SIGINT SyslogIdentifier=dotnet-example User=www-data Environment=ASPNETCORE_ENVIRONMENT=Production Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false [Install]
then i activated it without problem with the command "sudo systemctl enable kestrel-APIDossiers"
i start it with sudo systemctl start kestrel-APIDossiers
but i have the error "site innaccessible" anyone has an idea what it is?
first check the service is ok. if the code is using host headers use postman or curl and set the headers.
[http://127.0.0.1:5000;]
you can also check the system log to be sure you have the correct port.
I recommend you to view the following article
I have written step by step guide to publish .net application to Ubuntu and NGINX. Try to follow the steps. The commands are published to Github
https://github.com/sreejukg/DeployASP.NetCoreToLinux/blob/main/asp.netcorelinuxdeploymentscrpts
Hope this helps