Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I serve html thru svn ? (Can svn act as a web server?)

Tags:

html

svn

I have checked in javadocs(html files) into svn. But, when I access the html files thru a browser, it gets interpreted as text. How, do I fix this ?

like image 439
smartnut007 Avatar asked Nov 04 '10 18:11

smartnut007


1 Answers

SVN is not a webserver. I guess you are talking about Subversion's Apache module!? If you want to view .html files as HTML then you should set svn:mime-type=text/html:

svn propset svn:mime-type text/html *.html

See Properties in the SVN Book.

Also, if the svn:mime-type property is set, then the Subversion Apache module will use its value to populate the Content-type: HTTP header when responding to GET requests. This gives a crucial clue about how to display a file when perusing your repository with a web browser.

Maybe you can configure your subversion client or server with the following lines in the config file:

[miscellany]
### Automatic properties are defined in the section 'auto-props'.
enable-auto-props = yes

### Section for configuring automatic properties.
[auto-props]
*.html = svn:mime-type=text/html

This will automatically set the properties for new files.

like image 175
splash Avatar answered Oct 21 '22 16:10

splash