0

I have a few Apache virtual hosts set up. I'd like to access them from the outside. I found an article, Port-based Apache virtual hosts, that explained that you can tell each to listen on a specific port:

Listen 10080 <VirtualHost *:80 *:10080> DocumentRoot "/Users/.../public_html" ServerName www.foo.com <Directory "/Users/.../public_html"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order deny,allow Allow from all </Directory> </VirtualHost> 

Each would need a Listen <unique port> and I'd have to forward each port on my router. So the result would be:

  • http://<my ip address>:10080
  • http://<my ip address>:10081
  • http://<my ip address>:10082
  • etc...

Is there a better solution?

1 Answer 1

1

You are looking for "name based virtual hosts".

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.