Apache 's svn module can only provide the svn preview function, which is unable to execute the file directly. Because svn isn't stored on the server, it's stored in a certain format in a certain format. The svn module is used to parse this format.
If you want to preview the effect immediately after the svn commit, you can use the svn hook functionality, called svn hook, which allows you to.
First create a web directory on the server that you want to ask for later, such as this ( permission issue ).
In apache, configure the php runtime environment for this directory to ensure that it can be accessed.
Check out for a code to this directory ( which replaces the url of svn )
svn co http://my-svn-host/my-svn-path/wwwroot/svn-preview/--username=my-svn-username
Now we've the latest version of the code and can access it. And then to solve the problem of automatic synchronization. Find the repos directory of svn, look at your example, it seems to be
You can see that there are a lot of the hook template files ( at the end of the tmpl, you just need to remove the extension, you can take effect ). And we need to be, so find
post-commit.tmpl, copy him a copy.
cp post-commit.tmpl post-commit
chmod +x post-commit
It's time to open the hook file, and there's an example about sending a message after each submission, with
# to append the line to the beginning, and we don't need it. We don't need it. Adding our orders to the last face, actually a line.
svn up/wwwroot/svn-preview/--username=my-svn-username --password=my-svn-password
Submit a file to svn, and then visit it to see if it's normal.