0

I want to run one apache and one asp.net server at the same time. What i want to achieve:

apache: domain1.com, sub1.domain1.com, domain2.com,

asp.net: sub2.domain1.com

Currently i can't achieve this because in the current configuration:

apache: *.domain1.com

asp.net: completely shadowed i think

My current httpd.vhosts file:

<VirtualHost *:80>
    ServerAdmin admin@domain1.com
    DocumentRoot "C:\xampp\htdocs\domain1.com" 
    ServerName domain1.com 
    ErrorLog "logs/dummy-host.example.com-error.log" 
    CustomLog "logs/dummy-host.example.com-access.log" common 
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin admin@domain1.com
    DocumentRoot "C:\xampp\htdocs\sub1.domain1.com" 
    ServerName sub1.domain1.com 
    ErrorLog "logs/dummy-host.example.com-error.log" 
    CustomLog "logs/dummy-host.example.com-access.log" common 
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin admin@domain2.com
    DocumentRoot "C:\xampp\htdocs\domain2.com" 
    ServerName domain2.com 
    ErrorLog "logs/dummy-host.example.com-error.log" 
    CustomLog "logs/dummy-host.example.com-access.log" common 
</VirtualHost>

And my dotnet application is registered to http://[::]:8080 (in the config file the domain2.com was specified). I'm using Cloudflare for dns management and if sub2.domain1.com has no answer on port 80 it's gonna look for port 8080.

Thanks in advance!

  • 1
    Does this answer your question? [How can I forward requests from my web server?](https://serverfault.com/questions/1035016/how-can-i-forward-requests-from-my-web-server) – Gerald Schneider Mar 14 '22 at 05:44

0 Answers0