This post is hidden. You deleted this post just now.
I have two sites site1 and site2 as follows. I’m trying to host them on same port under different alias.
C:
└── git-workspace
└── bitbucket
└── dependency-graph
├── site1
│ └── graph-output
│ └── index.html
└── site2
└── graph-output
└── index.html
Below is teh virtual host configuration for my suecase:
hosting multiple sites on same port on Apache via vIrtualHosts without need for configuring hosts file:
<VirtualHost *:8090>
ServerAdmin [email protected]
DocumentRoot "C:workspacedependency-graph"
ServerName site1.com
Alias /dependency-graph/site1 "C:workspacedependency-graphsite1graph-output"
<Directory "C:workspacedependency-graphsite1graph-output">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ErrorLog "logs/site1.com-error.log"
CustomLog "logs/site1.com-access.log" common
</VirtualHost>
<VirtualHost *:8090>
ServerAdmin [email protected]
DocumentRoot "C:workspacedependency-graph"
ServerName site2.com
Alias /dependency-graph/site2 "C:workspacedependency-graphsite2graph-output"
<Directory "C:workspacedependency-graphsite2graph-output">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ErrorLog "logs/site2.com-error.log"
CustomLog "logs/site2.com-access.log" common
</VirtualHost>
Upon restarting apache, site1 is gettinhg served successfully. However, site2 always returns Forbidden 403.
Upon reversing the declaration order of site 1 and site2, the site2 is getting served succesfully and site1 now returns Forbidden.
Looks like any one site is eventually getting served.
What configuration changes do I need to make to get it working. I don’t wish to use different ports or make any chanegs to the hosts file or directory structure nor do I wish to specify any IP address.