Hi all,
New to the forum but wanted to get exactly the same feature for my slimserver.
Having done some research I came up with the following process to generate the mod_proxy_html shared object. Note also needed mod_xml2enc for some of the functionality.
I tested this on a ts-639 and Firmware version 3.2.4 Build 0315T and it works for me but there are no guarantees that it will work for you.
Basically you will need the following installed:
I may have other stuff installed but that would be back in the history of the NAS. Had it for 9 months...
So to deal with the ipkg stuff I will assume that you have already installed ipkg through the gui:
Logon to the NAS box
- Code: Select all
ipkg install bash
ipkg install libxml2
Then you need to setup some directories and some links. This is what I did but the directories can be changed to a suitable location on your NAS:
- Code: Select all
## link bash so that apxs can find it.
ln -s /opt/bin/bash /bin/bash
## setup area to enable the apxs and libtool to run successfully,
## looks like the apxs that is installed by default has development paths in it so these tweak the system to allow the command to run
mkdir /share/MD0_DATA/tmp
ln -s /share/MD0_DATA/tmp /root/daily_build
cd /share/MD0_DATA/tmp
mkdir -p 0110branch/Model/TS-259/../../NasMgmt/HTTP
cd 0110branch/Model/TS-259/../../NasMgmt/HTTP
ln -s /usr/local/apache apache_install_tmp
ln -s /share/MD0_DATA/tmp /opt/cross-project
cd /share/MD0_DATA/tmp/
mkdir -p x86/sys-root
cd x86/sys-root
ln -s /bin bin
Note: I left these in place once completed and it works for me. I did have a problem with the sys-root originally in that the apache would not start but I changed the depth of the final link to be bin rather than sys-root which fixed the problem.
The next stage is to get the Apache module source I would recommend using the above tempory directory for this so as not to fill the root partition.
- Code: Select all
## get apache module
cd /share/MD0_DATA/tmp
wget http://apache.webthing.com/mod_proxy_html/mod_proxy_html.tar.bz2
bzip2 -d mod_proxy_html.tar.bz2
tar xvf mod_proxy_html.tar
cd mod_proxy_html
cp proxy_html.conf /usr/local/apache/conf/extra
Note: Not sure if bzip2 is part of the core NAS build or an ipkg. I will leave that up to you to find out but if it needs to be installed it would be ipkg install bzip2 at a guess.
Next we need to compile the Apache module.
- Code: Select all
## compile module
cd /share/MD0_DATA/tmp
/opt/bin/perl /usr/local/apache/bin/apxs -I/opt/include/libxml2/libxml -I/usr/local/apache/include -I. -i -c mod_proxy_html.c
/opt/bin/perl /usr/local/apache/bin/apxs -I/opt/include/libxml2/libxml -I/usr/local/apache/include -I. -i -c mod_xml2enc.c
Note: This will put the module in /usr/local/apache/module
That is it with regards to the getting the module compiled you would have to add the relevant config files to apache config. I note that you wanted to get slimserver running as a reverse proxy. In order to do that I had to make the following amendments to the proxy_html.conf file:
Uncomment the following lines:
ProxyHTMLLinks frame src longdesc
ProxyHTMLLinks iframe src longdesc
ProxyHTMLLinks body background
ProxyHTMLLinks applet codebase
I also had limited success in getting slimserver to work with the new Default skins and had to switch to the Classic skin. I think this is due to the js files not being passed properly but I am happy with the classic look.
This is my config file (/usr/local/apache/conf/extra/slimserver.conf):
- Code: Select all
## load all stuff that is required
Include /etc/config/apache/extra/proxy_html.conf
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so
LoadFile /usr/lib/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so
# Slimserver Reverse Proxy Configuration
# Prepared by BV January 2008
#
# Make sure that the server cannot be abused
ProxyRequests Off
#ProxyHTMLLogVerbose On
# The Proxy section below allows internet users
# to access the internal server
#ProxyHTMLExtended On
ProxyPass /slimserver/ http://localhost:9001/
ProxyHTMLURLMap http://localhost:9001 /slimserver
ProxyPass /jsonrpc.js http://localhost:9001/
ProxyHTMLURLMap http://localhost:9001 /jsonrpc.js
ProxyPass /html/ http://localhost:9001/
ProxyHTMLURLMap http://localhost:9001 /html
<Location /slimserver/>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /slimserver/
RequestHeader unset Accept-Encoding
</Location>
You will need an Include entry in the /usr/local/apache/conf/apache.conf file to source this file.
All being well this should work and if anybody manages to get the Default skin to work I would be very interested how this was performed.
Dave