4

I'm creating new ASP.NET Core application and it run on https://localhost:44382/. I want to set multiple urls to browse my application like site1.testing.com, site2.testing.com, site3.tseting.com.

Everytime I browser those urls , I want to redirect to my application.
I found this setting in launchSetting.json

 "myCoreApp": {
  "commandName": "Project",
  "launchBrowser": true,
  "applicationUrl": "https://localhost:5001;http://localhost:5000",
  "environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  }
}

as you see

"applicationUrl": "https://localhost:5001;http://localhost:5000",

By referencing this , I've tried changing in this setting and doesn't work.

1
  • You can point site1.testing.com and site2.testing.com to one real web application (Use NGINX server block, or Apache HTTP Server virtual host). I belief that, IIS also support this type of configuration. I did this. You can have belief you can do it. Commented Jun 14, 2020 at 15:00

1 Answer 1

5

You cannot declare more than 1 URL for HTTP, and 1 URL for HTTPS protocol. (exclude case: you use different environment parameter).

Recommend for you (also is best practice):

  • Use NGINX server block, or
  • Apache HTTP Server virtual host.

Reference:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.