I got my Application almost running (I think).
I startet it on the server with “dotnet Wisej3Sample.dll –urls=http://localhost:5001/” (Its a small “Hello World”-Test-Application.)
I configured my Apache to use the proxy like this:
<Location /Wisej3Sample/>
ProxyPass http://127.0.0.1:5001
</Location>
When i try to open the url in my browser i get a white page with the following source code:
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Wisej3Sample</title> | |
<meta charset=”utf-8” /> | |
<meta http-equiv=”X-UA-Compatible” content=”IE=Edge;IE=11” /> | |
<meta http-equiv=”Cache-Control” content=”no-store” /> | |
<script src=”wisej.wx“></script> | |
</head> | |
<body> | |
</body> | |
</html> |
When i click on “wisej.wx” I get the following response:
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request
Reason: DNS lookup failure for: 127.0.0.1:5001wisej.wx
What am I missing? Any help would be appriciated.
Sorry for the duplicate, that wasn’t my intention.</br>
Unfortunately I haven’t gotten any further.
I did the following:
1. I added the backslash to the apache2 configuration file. The configuration file now looks like this:
<VirtualHost wisej.mdi-test.de:80>
DocumentRoot “/var/www/vhosts/wisej.mdi-test.de/”
Server name wisej.mdi-test.de
<Directory “/var/www/vhosts/wisej.mdi-test.de/”>
OptionsNone
Require all granted
</Directory>
ProxyPass / http://127.0.0.1:5001
</VirtualHost>
2. The app is now running as a service with the following script:
[unit]
Description = Wisej Hello World test application
[Service]
WorkingDirectory=/var/www/vhosts/wisej.mdi-test.de
ExecStart=/snap/bin/dotnet /var/www/vhosts/wisej.mdi-test.de/Wisej3Sample.dll –urls=http://localhost:5001/
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dotnet-example
User=root
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
The service is up and running.
3. I made sure libgdiplus is installed.
4. I made sure default.html and default.json are in my published directory on the server.
However: When i call the application under “http:// wisej.mdi-test.de” i still get an empty page. When i call “http://wisej.mdi-test.de/Default.html” i get an proxy error with: DNS lookup failure for: 127.0.0.1:5001default.html.
I am getting desperate and am asking for help again.
It’s probably a stupid mistake, but I don’t see it.
Hi Dirk,
You’re missing the trailing slash on your ProxyPass url.
The Apache config should be the following:
ProxyPass / http://127.0.0.1:5001/
And I would also suggest that you start the server as a service or a daemon.
Also, Like I said in your previous question, make sure that you have Libgdiplus installed!
HTH,
Alaa
Please login first to submit.