
Wie ändere ich den Admin-Port auf einer LS-WXL?
Diese Anleitung ist auf englisch geschrieben um sie bei nas-central.org auch zu postenTutorial - How to change Admin port on a LS-WXL
This tutorial is based on the theory that you do not really need TWO instances of the webinface. Normaly one instance is enough esp. if you have SSH/root access.
1. First of all backup all files we will edit
Code:
cp /etc/lighttpd/lighttpd.conf /mnt/array1/backup/
cp /etc/lighttpd/buffalo-web_https.conf /mnt/array1/backup/
cp /etc/init.d/httpd.sh /mnt/array1/backup/
cp /etc/daemonwatch.list /mnt/array1/backup/
2. we want to edit the startup script
Code:
vi /etc/init.d/httpd.sh
Now we change the startup procedure in the following way (just comment all commands for the webui):
Code:
# this is used by daemonwatch
ACTIVE_FILE=/var/run/active_httpds
start()
{
echo "start"
echo -n $"Starting $KIND services: "
cat /etc/apache/server.key /etc/apache/server.crt > /etc/apache/server.pem
# ${LIGHTTPD_WEBUI} -f "$LIGHTTPD_CONF"
# RETVAL=$?
# PID=`basename ${LIGHTTPD_WEBUI}|xargs pidof`
# echo ${PID} > /var/run/httpd.pid
# echo
# [ $RETVAL -eq 0 ] && touch /var/lock/subsys/httpd || RETVAL=1
${LIGHTTPD_WEBUI} -f "$LIGHTTPD_HTTPS_CONF"
RETVAL=$?
PID=`basename ${LIGHTTPD_WEBUI}|xargs pidof`
echo ${PID} > /var/run/httpd_https.pid
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/httpd_https || RETVAL=1
touch ${ACTIVE_FILE}
}
3. After that we change the configuration of the https admin interface
Code:
vi /etc/lighttpd/buffalo-web_https.conf
and if you don't want to have SSL, please comment the SSL lines in the file also:
Code:
# ssl.engine = "enable"
# ssl.pemfile = "/etc/apache/server.pem"
If you want to have your admin interface without and with SSL please replace the ssl part with:
Code:
$SERVER["socket"] == ":8081" {
ssl.engine = "enable"
ssl.pemfile = "/etc/apache/server.pem"
}
4. Now we change the daemonwatch to make sure that only the new admin interface will be monitored
Code:
vi /etc/daemonwatch.list
Code:
/var/run/httpd_https.pid /var/run/active_httpds /etc/init.d/httpd.sh restart
/var/run/smbd.pid /var/run/active_smb /etc/init.d/smb.sh restart
/var/run/nmbd.pid /var/run/active_smb /etc/init.d/smb.sh restart_nmbd
/var/run/clientUtil_server-eth1.pid /var/run/active_clientUtil_server.eth1 /etc/init.d/clientUtil_servd.sh restart
/var/run/errormon.pid /var/run/active_errormon /etc/init.d/errormon.sh restart
/var/run/kernelmon.pid /var/run/active_kernelmon /etc/init.d/kernelmon.sh restart
4. Edit your webserver configuration to change the port to 80
Code:
vi /etc/lighttpd/lighttpd.conf
5. Test your settings by restarting the webui and http server
Code:
/etc/init.d/httpd.sh restart
Code:
/etc/init.d/lighttpd.sh restart
6. Finally you can reboot your WXL and all changes are applied
7. I know that there are some smoother ways to do this changes, but it should only give an impression what you can do!
attention: this tutorial is without any warranty!