[Help] 1 listener with 2 Virtual Host

#1
Hello to everyone,

i have stack for many hours and i need your help!

I have a listener with name Development and 2 virtual host with names Personal_Website and LOL. I want to run the virtual host Personal_Website via url: 127.0.0.1:8088/pw/ and the virtual host LOL via run: 127.0.0.1:8088/lol/ but i don't know what mapping i must do to listener Development.

I can somebody to help me?

Thanks you,
Panagiotis
 

lsfoo

Administrator
#2
Hi Panagos,

You have a couple options here:
1. Map them according to domain name. When it comes time to pick a vhost, the server will look at the domain name and go to the associated vhost.
2. This doesn't necessarily match your case, but if there are minimal differences between the two vhosts, you can use a single vhost and differentiate the actual pages seen based on the context provided.

As an example of number 2, in your directory tree, you could have a single vhost directory with context sub directories:
/Example/html/pw/<personal website pages>
/Example/html/lol/<LOL pages>

To fully explain, the protocol uses the path as the actual path within the vhost's document root. Even if you map them according to domain name, the files will still have to be in a sub directory within each vhost document root:
/VHost1/html/pw/<personal website pages>
/VHost2/html/lol/<LOL pages>

So lets say you only have one domain name for your site.
You want to use it for your real site, but you also want to use it for testing stuff, things that you don't necessarily want other people to see because it's buggy.
Other than that, there's no differences between the two.

In this scenario, it's OK to use the same vhost for both types of sites.
Even better, if you want to prevent access to the development/testing site, you can set up a context in the vhost settings to be similar to the protected context example where you have to provide a user and password combo to access the context.

Hope this helps, let me know if you have any more questions,
Kevin
 
Top