-1

I am using Windows Server 2016 Data center, Apache 2.4, ASP.NET Core 2.2

I build ASP.NET Core project, then I run

dotnet foodotcom.dll

Stand at local Windows server, I can access web app at

http://localhost:5000

I want use Apache 2.4 to create a virtual host, map domain foo.com to http://localhost:5000 (My server has static IP). How to do that?

(Seemly something like Apache's ProxyPass, but I am not sure)

  • What have you tried? What did you expect to happen? What happened instead? What does your config look like? Do you have any log entries from the times it didn't work as expected? – Jenny D May 26 at 12:48
0

in httpd.conf , uncomment these lines

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

and

<VirtualHost foo.com:80>
    ProxyPass / "http://localhost:5000/"
</VirtualHost>

in C:\Windows\System32\drivers\etc\ add this line

103.48.xxx.xxx foo.com

In domain DNS administration page, add record

@   A  103.48.xxx.xxx
www A 103.48.xxx.xxx

We can go to http://foo.com success.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.