Home > Article > Backend Development > Domain + subdomain IIS deployment
php editor Strawberry introduces domain subdomain IIS deployment to you, which is a method of configuring multiple domain names and subdomain names on the IIS server. Through flexible configuration of domain names and sub-domain names, multiple websites can be run on the same server, improving server utilization. During the deployment process, IIS needs to be set up and configured accordingly to ensure that each domain name and subdomain name can be accessed normally. This deployment method not only facilitates the management and maintenance of multiple websites, but also improves user experience and website usability.
I have two websites. The first is asp.net core web ui. Followed by golang api. I also bought a domain name. foo.bar (for example). I need two websites:
How to deploy it on iis? My go-server works on port 8080. I try to create two sites:
And foo.bar (ui) works
I also tried using iis rules to redirect api-traffic to port 8080 but it didn't work. For api.foo.bar I only get error 404. The only result I get is that api.foo.bar:8080 is opened correctly from the server's browser.
I created two websites:
Then I put the rewrite rules into api-site's web.config:
<rewrite> <rules> <remove name="ReverseProxyInboundRule1" /> <rule name="ReverseProxyInboundRule1" patternSyntax="Wildcard" stopProcessing="true"> <match url="*" /> <action type="Rewrite" url="http://localhost:8080/{R:0}" /> </rule> </rules> </rewrite>
everything is normal
The above is the detailed content of Domain + subdomain IIS deployment. For more information, please follow other related articles on the PHP Chinese website!