Two virtual hosts with one IP and no domain
<virtualhost 178.79.177.xx:80="">DocumentRoot /srv/www/site.es/public_html/
ErrorLog /srv/www/site.es/logs/error.log
CustomLog /srv/www/site.es/logs/access.log combined</virtualhost>
I still don't have a domain name.
Now I want to install another application in another folder, how should I do it? Can it be done without a domain?
Thank you.
2 Replies
@fernandoch:
Now I want to install another application in another folder, how should I do it? Can it be done without a domain?
Thank you.
Well, you'll need something that you can key off of in the request to distinguish the two "sites", but no it doesn't have to be the host name. That can be simplest though.
Without having different names, you'd have to vary the IP address (unlikely this is justification enough for a second address), or the port (can you tell the second site to use something non-standard?) or start using parts of the request portion of the URL.
The URL approach could work if you were to subdivide your sites by the top level URL (e.g.,
It looks like your site(s) are basically static, so doing it in one server should be fine. But if you have more dynamic sites or applications already configured to be at the root of a URL, a way you can handle it is to have each site configured on a non-standard port (but only on localhost). This can be in a distinct web server instance or the same main server. Then have the main web server instance handle the public address URLs, and proxy to the appropriate internal port, with the usual URL rewriting across the proxy call. That keeps each application separate and lets them exist at the root of their own URL hierarchy.
-- David
I got a bit lost with your explanation
Anyways, what I did is adding an alias as follows
<virtualhost 178.79.177.xx:80="">DocumentRoot /srv/www/site.es/public_html/
Alias /wiki /srv/www/wiki.site.es/public_html/
ErrorLog /srv/www/site.es/logs/error.log
CustomLog /srv/www/site.es/logs/access.log combined</virtualhost>