Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jun 10, 2012 2:00 pm 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
I have a virtual host that works as shown here (I changed the IP address for security reasons)

Code:
<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.


Top
   
PostPosted: Sun Jun 10, 2012 5:15 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
fernandoch wrote:
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., http://x.y.z.w/site1/... and http://x.y.z.w/site2/...), either by rewriting to a new location, or proxying to alternate servers. It can be tricky when retrofitting (as here) since you're already using the top level for one site, but as long as the prefix is not going to interfere with your first site, it should be fine. Though unless both sites have a prefix (and thus the root can be handled specially), the site without the prefix can accidentally be returned if a client for the other site leaves their prefix off a request.

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


Top
   
PostPosted: Wed Jun 13, 2012 4:37 am 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
Weird, I did not get the notification with your reply.

I got a bit lost with your explanation :( but thank you.

Anyways, what I did is adding an alias as follows

Code:
<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>


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group