Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've setup Apache and Subversion on an old PC, but Apache is not serving pages correctly, when I enter the address to my test site:

http://HOME_IP_ADDRESS/test/index.html

I just get a File Not Found error and the following output in the error log:

File does not exist: /var/www/html/svn/repos/test

but I know the file exists, when I enter the following URL into the browser:

 http://HOME_IP_ADDRESS/repos/test/index.html

I just get a listing of the HTML. In my Apache config file I have the Document Root set as follows:

DocumentRoot "/var/www/html/svn/repos"

so I'm not sure what is going on, I have SVN installed and I think it may have something to do this.

  • Edit *

I changed the Document Root location, which helped as pages in the new location were served correctly, so the problem is with just serving the pages from the repository.

share|improve this question
    
Can you post the output from sudo apachectl -S –  heavyd Oct 21 '13 at 19:59
    
Try it with a trailing slash like this DocumentRoot "/var/www/html/svn/repos/" –  MonkeyZeus Oct 21 '13 at 20:06
    
@heavyd VirtualHost configuration: Syntax OK –  Stephen Oct 21 '13 at 21:09
    
@MonkeyZeus just tried it with the extra forward slash, but made no difference. –  Stephen Oct 21 '13 at 21:10
    
Any luck with this? Did you try un-installing SVN and seeing if it made a difference? If you change DocumentRoot to something completely different like /var/www/new_html/projects/a_project/ then does it have any effect at all? –  MonkeyZeus Oct 22 '13 at 12:25

1 Answer 1

up vote 0 down vote accepted

Ok, I figured it with a bit of help from a colleague in work and also from MonkeyZeus above.

Firstly, the SVN repository should not be installed in the Document Root location. While the instructions here (http://wiki.centos.org/HowTos/Subversion) are not actually wrong, its a bit misleading.

Apache cannot serve the pages directly from the SVN repository. So I had to checkout the files from the repository into the Document Root folder.

So when I'm working on my local copy in Eclipse on my laptop, I save the changes and commit the changes.

I then log onto my server, navigate to the Document Root and type the command:

svn st -u

this tells me what files in the Document Root need to update as they are different than what is in the repository.

To update the files I type:

svn update

and that's it.

Thanks to MonkeyZeus for your assistance, it helped get me in the right direction.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.