I have a dotnet project. I have uploaded my code to my VPS Server. I have created a service file and it is working fine (tested via Postman). But I need an SSL certificate. This reason why I have to use apache on my server. I have created a config file and I tried install SSL certificaet with Let's Encrypt but I think there is a problem. Can you check that?Here is my service file (It's working fine vith postman):
[Unit]Description=BackendAuth[Service]WorkingDirectory=/var/apps/BackendAuthExecStart=/usr/bin/dotnet /var/apps/BackendAuth/BackendAuth.dllRestart=alwaysRestartSec=10User=rootEnvironment=ASPNETCORE_URLS=http://server_ip:5243[Install]WantedBy=multi-user.target
And here is my application config file:
<VirtualHost *:80> ProxyPreserveHost On ProxyPass / https://server_ip:5243/ ProxyPassReverse / https://server_ip:5243/ ServerName server.mobimenti.co ServerAlias server.mobimenti.co</VirtualHost><VirtualHost *:443> ProxyPreserveHost On ProxyPass / https://server_ip:5243/ ProxyPassReverse / https://server_ip:5243/ ServerName server.mobimenti.co ServerAlias server.mobimenti.coInclude /etc/letsencrypt/options-ssl-apache.confServerAlias www.server.mobimenti.coSSLCertificateFile /etc/letsencrypt/live/server.mobimenti.co/fullchain.pemSSLCertificateKeyFile /etc/letsencrypt/live/server.mobimenti.co/privkey.pem</VirtualHost>