LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-16-2010, 04:24 PM   #1
treznik
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Rep: Reputation: 0
Apache2 VirtualHost non-recurring Directory


Hi, I didn't know exactly where to put this, but here it goes:

For the record, I have Apache2 on Ubuntu.

OK so I have a "svn" subdomain for SVN repositories. The repositories are actual separate repositories, not a big one for all. So I'm using SVNPath not SVNParentPath (please don't suggest this as a possible fix).

The problem is I want to be able to list the repositories (or even put a blank page for that matter) at svn.mydomain.com. All repositories have a svn.mydomain.com/myrepository path with a VirtualHost for each. So when I create another VirtualHost just for the / path, it overrides all the SVN VirtualHosts, as it covers / and all sub-directories.

I would like a way to set that VirtualHost to affect just the root directory, without the sub-directories. Or to make the SVN VirtualHosts override it.

Either way, is this possible? What approach should I take? Thanks!
 
Old 10-15-2010, 09:03 AM   #2
wclark
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
Are you using the NameVirtualHost directive?

I haven't configured vhosts with names like svn.mydomain.com/myrepositorypath. Anotherwords, I am not sure if apache will read the myrepositorypath part of the servername.
But if it will, then using NameVirtualHost should work for you.

NameVirtualHost 123.123.123.123:80

<VirtualHost 123.123.123.123:80>
ServerName svn.mydomain.com
DocumentRoot /home/where-ever-1
...
</VirtualHost>

<VirtualHost 123.123.123.123:80>
DocumentRoot /home/where-ever-2
ServerName svn.mydomain.com/myrepositorypath
...
</VirtualHost>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 VirtualHost Question martinyeh Linux - Server 18 06-01-2008 03:25 PM
Apache2 VirtualHost Syntax OK but domain still doesn't work bg108 Linux - Server 11 04-18-2008 12:54 PM
Apache2 VirtualHost and SSL Alfar Linux - Server 2 10-20-2007 01:10 AM
Using VirtualHost with single IP in Apache2 gurl4sh25 Linux - Server 2 05-06-2007 09:32 AM
Apache2 virtualHost config problem jglazner Linux - Software 3 04-01-2004 02:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration