I have a remote server with all ports disabled except 22 (ssh). I use Putty to connect to the server with a forwarded port (Source port: 8080 Destination: *.*.*.*:80). When I open a browser and put localhost:8080 in I get the appropriate webpage.
Now I want to have subdomain virtual hosts like this: subdomain.localhost:8080. Subdomain being the name of a folder.
I've tried this:
When I try to access "localhost:8080" with "UseCanonicalName On" in chrome it returns "NOT FOUND Apache/2.2.16 (Debian) Server at sub.domain.com Port 80" (I figured out it tries to find an index in "sub" folder)
When it's "UseCanonicalName Off" it returns "NOT FOUND Apache/2.2.16 (Debian) Server at localhost Port 8080". (tries to find an index in "localhost" folder).
In both cases when I try to access "sub.localhost:8080" chrome returns ERR_NAME_NOT_RESOLVED.
They seem to be separate issues. In first two cases no matter what I try it never registers ServerAlias. In the third one it doesn't seem to even make it to the server.
Can you help me with this?