bonienl Posted January 13, 2014 Author Share Posted January 13, 2014 Some further testing shows that the combination of emhttp and PHP version 5.3.27 has issues with share names containing an apostrophe. It is at a level which I can't change. If you want to stick to share names with an apostrophe, don't run the web server plugin (it installs the newer PHP version), otherwise remove the apostrophe from the share name BEFORE installing the web server plugin. Quote Link to comment
anthropoidape Posted January 13, 2014 Share Posted January 13, 2014 Thanks bonienl. I thought about it, and decided that apostrophes are not particularly good practice anyway. They are always going to be a risk for some form of breakage. Thanks for looking at it! Quote Link to comment
zottffssen Posted January 14, 2014 Share Posted January 14, 2014 If I want to enable mod_proxy, is there a way to do it without it being reset on boot? Quote Link to comment
bonienl Posted January 14, 2014 Author Share Posted January 14, 2014 If I want to enable mod_proxy, is there a way to do it without it being reset on boot? I haven't tested it, but you can add your own customized configuration in the file /boot/config/plugins/dynamix/dynamix.lighttpd.cfg, these won't get lost upon a system reboot. Quote Link to comment
zottffssen Posted January 14, 2014 Share Posted January 14, 2014 I haven't tested it, but you can add your own customized configuration in the file /boot/config/plugins/dynamix/dynamix.lighttpd.cfg, these won't get lost upon a system reboot. I've successfully put the reverse proxy settings there which work fine but the line that enables mod_proxy is currently commented out in /etc/lighttpd.conf, which is in volatile memory. I tried adding that line to dynamix.lighttpd.cfg but I couldn't start the webserver with it. Quote Link to comment
bonienl Posted January 14, 2014 Author Share Posted January 14, 2014 Thanks bonienl. I thought about it, and decided that apostrophes are not particularly good practice anyway. They are always going to be a risk for some form of breakage. Thanks for looking at it! Characters like double-quote (") or single-quote/apostrophe (') always require special attention as they may be interpreted the wrong way by PHP. There are ways within PHP to 'escape' these characters, but it remains a PITA. You have chosen the easiest solution though Quote Link to comment
bonienl Posted January 14, 2014 Author Share Posted January 14, 2014 I haven't tested it, but you can add your own customized configuration in the file /boot/config/plugins/dynamix/dynamix.lighttpd.cfg, these won't get lost upon a system reboot. I've successfully put the reverse proxy settings there which work fine but the line that enables mod_proxy is currently commented out in /etc/lighttpd.conf, which is in volatile memory. I tried adding that line to dynamix.lighttpd.cfg but I couldn't start the webserver with it. Right, when the same parameter "server.modules" exists in both /etc/lighttpd.conf and /boot/config/plugins/dynamix/dynamix.lighttpd.cfg, the process won't start and tells there is a duplicate. A workaround is to have it modified from the PLG file (it makes your PLG file custom though), add the following before starting the service, it is near the end of the file: # Start service sed -i "s:^#\( *\"mod_proxy\",\): \1:" /etc/lighttpd.conf This removes the '#' for mod_proxy before proceeding with the service. Quote Link to comment
zottffssen Posted January 14, 2014 Share Posted January 14, 2014 Right, when the same parameter "server.modules" exists in both /etc/lighttpd.conf and /boot/config/plugins/dynamix/dynamix.lighttpd.cfg, the process won't start and tells there is a duplicate. A workaround is to have it modified from the PLG file (it makes your PLG file custom though), add the following before starting the service, it is near the end of the file: # Start service sed -i "s:^#\( *\"mod_proxy\",\): \1:" /etc/lighttpd.conf This removes the '#' for mod_proxy before proceeding with the service. Cool, thanks for the reply. I might actually just put that in the go script along with a command that restarts the webserver. Quote Link to comment
bonienl Posted January 14, 2014 Author Share Posted January 14, 2014 I might actually just put that in the go script along with a command that restarts the webserver. The 'go' script is executed after the installation of the PLG files. When the service is already started by the PLG file (i.e. you have enabled the service from the GUI) then modding the 'go' script requires more steps: /etc/rc.d/rc.lighttpd stop sed -i "s:^#\( *\"mod_proxy\",\): \1:" /etc/lighttpd.conf /etc/rc.d/rc.lighttpd start Quote Link to comment
dertbv Posted January 15, 2014 Share Posted January 15, 2014 I have updated the plugin with the line sed -i "s:^#\( *\"mod_proxy\",\): \1:" /etc/lighttpd.conf However I still am unable to get the webserver to start when using a a customized dynamix.lighthttpd.cfg file # User customizations # Add your own settings here. These won't get overwritten upon reboot ## Abdd your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.0.199:81" { server.document-root = "/mnt/user/apps/nZEDb/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.0.199:9088" { server.document-root = "/mnt/user/apps/phpMyAdmin/" } webserver is pointing to /mnt/user/apps/nZEDb/www on port 9000 Any ideal where I am making my mistake? Quote Link to comment
ijuarez Posted January 15, 2014 Share Posted January 15, 2014 How did you install the web server plugin, did you use CLI and the command "installplg" ? Can you execute the following (telnet into your system) and post the results: lighttpd -f /etc/lighttpd.conf php -v lighttpd -f /etc/lighttpd.conf => 2014-01-02 12:00:05: (log.c.166) server started php -v => php: error while loading shared libraries: libmcrypt.so.4: cannot open shared object file: No such file or directory The PHP error refers to a problem in the OPENSSL library, either PHP or OPENSSL didn't get installed properly, or you have another plugin installed which may have a conflicting openssl package installed. Can you telnet into your server and do the following: rm /boot/config/plugins/dynamix.web.server*.plg rm /boot/config/plugins/dynamix/dynamix.web.server* rm /boot/packages/openssl* Reboot your system to complete the uninstall of the web server and associated packages. Next download the latest PLG file (right-click and choose "save link as" - store it in /boot/config/plugins And re-install the web server plugin cd /boot/config/plugins installplg dynamix.web.server-2.0.2-noarch-bergware.plg Also make sure there are no *competing* plugins installing openssl as well. Fresh download of unraid 5.0.4 nothing else, DL Dynamix webGUI installed *checked* install plugin control (check), tried to DL webserver from plugin control (failed). RM all instance of webserver. Reboot server, used pluging control to DL systeminfo install correctly (check) copied webserver plg to correct directory and install using installplg. see outpit below Package dynamix.web.server-2.0.2-i486-1.txz installed. success file /boot/config/plugins/images/dynamix.web.server.png: already exists file /usr/local/emhttp/plugins/dynamix/images/dynamix.web.server.png: successfully copied LOCAL file file /etc/rc.d/rc.lighttpd: successfully wrote INLINE file contents successfully changed file mode file /etc/rc.d/rc.snmpd: successfully wrote INLINE file contents successfully changed file mode file /usr/local/emhttp/plugins/dynamix/event/disks_mounted.dynamix.web.server: successfully wrote INLINE file contents successfully changed file mode file /usr/local/emhttp/plugins/dynamix/event/unmounting_disks.dynamix.web.server: successfully wrote INLINE file contents successfully changed file mode file /tmp/web/index.html: successfully wrote INLINE file contents file /tmp/plugin-install: successfully wrote INLINE file contents /bin/bash /tmp/plugin-install ... executing ! /boot/packages/openssl-solibs-0.9.8y-i486-1_slack13.37.txz: No such file or directory Package openssl-solibs-0.9.8y-i486-1_slack13.37.txz failed to install! /boot/packages/openssl-0.9.8y-i486-1_slack13.37.txz: No such file or directory Package openssl-0.9.8y-i486-1_slack13.37.txz failed to install! /boot/packages/libtool-2.4-i486-1.txz: No such file or directory Package libtool-2.4-i486-1.txz failed to install! /boot/packages/m4-1.4.16-i486-1.txz: No such file or directory Package m4-1.4.16-i486-1.txz failed to install! /boot/packages/libmcrypt-2.5.8-i486-1.txz: No such file or directory Package libmcrypt-2.5.8-i486-1.txz failed to install! /boot/packages/pcre-8.12-i486-1.txz: No such file or directory Package pcre-8.12-i486-1.txz failed to install! /boot/packages/sqlite-3.7.5-i486-1.txz: No such file or directory Package sqlite-3.7.5-i486-1.txz failed to install! /boot/packages/libzip-0.9.3-i486-1.txz: No such file or directory Package libzip-0.9.3-i486-1.txz failed to install! /boot/packages/freetype-2.4.11-i486-1_slack13.37.txz: No such file or directory Package freetype-2.4.11-i486-1_slack13.37.txz failed to install! /boot/packages/libjpeg-v8a-i486-2_slack13.37.txz: No such file or directory Package libjpeg-v8a-i486-2_slack13.37.txz failed to install! /boot/packages/libpng-1.4.12-i486-1_slack13.37.txz: No such file or directory Package libpng-1.4.12-i486-1_slack13.37.txz failed to install! /boot/packages/t1lib-5.1.2-i486-3_slack13.37.txz: No such file or directory Package t1lib-5.1.2-i486-3_slack13.37.txz failed to install! /boot/packages/libxcb-1.7-i486-1.txz: No such file or directory Package libxcb-1.7-i486-1.txz failed to install! /boot/packages/libX11-1.4.3-i486-2.txz: No such file or directory Package libX11-1.4.3-i486-2.txz failed to install! /boot/packages/libXau-1.0.6-i486-1.txz: No such file or directory Package libXau-1.0.6-i486-1.txz failed to install! /boot/packages/libXdmcp-1.1.0-i486-1.txz: No such file or directory Package libXdmcp-1.1.0-i486-1.txz failed to install! /boot/packages/libXpm-3.5.9-i486-1.txz: No such file or directory Package libXpm-3.5.9-i486-1.txz failed to install! ----------------------------------------------------------- dynamix.web.server has been installed. This plugin requires Dynamix webGui to operate Copyright 2013, Bergware International Version: 2.0.2 ----------------------------------------------------------- success file /var/log/plugins/dynamix.web.server: successfully wrote INLINE file contents plugin successfully installed root@Tower:/boot/config/plugins# Then followed the instruction to remove using rm /boot/etc etc, when i tried to remove openssl it told that the directory did not exists. any ideas? Quote Link to comment
bonienl Posted January 16, 2014 Author Share Posted January 16, 2014 I have updated the plugin with the line sed -i "s:^#\( *\"mod_proxy\",\): \1:" /etc/lighttpd.conf However I still am unable to get the webserver to start when using a a customized dynamix.lighthttpd.cfg file # User customizations # Add your own settings here. These won't get overwritten upon reboot ## Abdd your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.0.199:81" { server.document-root = "/mnt/user/apps/nZEDb/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.0.199:9088" { server.document-root = "/mnt/user/apps/phpMyAdmin/" } webserver is pointing to /mnt/user/apps/nZEDb/www on port 9000 Any ideal where I am making my mistake? Can you telnet into your system and do: lighttpd -f /etc/lighttpd.conf This will show any error messages upon starting the service. Quote Link to comment
bonienl Posted January 16, 2014 Author Share Posted January 16, 2014 any ideas? You need to create the directory /boot/packages. The plugin assumes it exists, but fails to install any packages since the directory is missing. Quote Link to comment
dertbv Posted January 16, 2014 Share Posted January 16, 2014 I have updated the plugin with the line sed -i "s:^#\( *\"mod_proxy\",\): \1:" /etc/lighttpd.conf However I still am unable to get the webserver to start when using a a customized dynamix.lighthttpd.cfg file # User customizations # Add your own settings here. These won't get overwritten upon reboot ## Abdd your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.0.199:81" { server.document-root = "/mnt/user/apps/nZEDb/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.0.199:9088" { server.document-root = "/mnt/user/apps/phpMyAdmin/" } webserver is pointing to /mnt/user/apps/nZEDb/www on port 9000 Any ideal where I am making my mistake? Can you telnet into your system and do: lighttpd -f /etc/lighttpd.conf This will show any error messages upon starting the service. Using the command I am getting (configfile.c.949) source: /etc/lighttpd.conf line: 327 pos: 1 parser failed somehow near here: (EOL) thanks Quote Link to comment
bonienl Posted January 16, 2014 Author Share Posted January 16, 2014 I have updated the plugin with the line sed -i "s:^#\( *\"mod_proxy\",\): \1:" /etc/lighttpd.conf However I still am unable to get the webserver to start when using a a customized dynamix.lighthttpd.cfg file # User customizations # Add your own settings here. These won't get overwritten upon reboot ## Abdd your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.0.199:81" { server.document-root = "/mnt/user/apps/nZEDb/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.0.199:9088" { server.document-root = "/mnt/user/apps/phpMyAdmin/" } webserver is pointing to /mnt/user/apps/nZEDb/www on port 9000 Any ideal where I am making my mistake? Can you telnet into your system and do: lighttpd -f /etc/lighttpd.conf This will show any error messages upon starting the service. Using the command I am getting (configfile.c.949) source: /etc/lighttpd.conf line: 327 pos: 1 parser failed somehow near here: (EOL) thanks That sounds like a syntax error in your custom config file. Double-check things like (missing) quotes. Quote Link to comment
dertbv Posted January 16, 2014 Share Posted January 16, 2014 I have updated the plugin with the line sed -i "s:^#\( *\"mod_proxy\",\): \1:" /etc/lighttpd.conf However I still am unable to get the webserver to start when using a a customized dynamix.lighthttpd.cfg file # User customizations # Add your own settings here. These won't get overwritten upon reboot ## Abdd your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.0.199:81" { server.document-root = "/mnt/user/apps/nZEDb/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.0.199:9088" { server.document-root = "/mnt/user/apps/phpMyAdmin/" } webserver is pointing to /mnt/user/apps/nZEDb/www on port 9000 Any ideal where I am making my mistake? Can you telnet into your system and do: lighttpd -f /etc/lighttpd.conf This will show any error messages upon starting the service. Using the command I am getting (configfile.c.949) source: /etc/lighttpd.conf line: 327 pos: 1 parser failed somehow near here: (EOL) thanks That sounds like a syntax error in your custom config file. Double-check things like (missing) quotes. You were right. I went through line by line and cleaned up everything. It is now working correctly. Thanks Quote Link to comment
ijuarez Posted January 16, 2014 Share Posted January 16, 2014 any ideas? You need to create the directory /boot/packages. The plugin assumes it exists, but fails to install any packages since the directory is missing. Yep that did it, thanks Quote Link to comment
althoralthor Posted January 26, 2014 Share Posted January 26, 2014 Evening all- Probably a dumb question, but what are my options for the web root directory? it defaulted to /tmp/web i believe (not sure where that is located). I tried to change it to a directory on a share on my unraid itself but when i try to open the web page I built by browsing to http://192.168.x.x:81/default.htm i get a 404 not found. Any help is appreciated. Quote Link to comment
ijuarez Posted January 26, 2014 Share Posted January 26, 2014 I believe it needs to be index.html Sent from my iPhone using Tapatalk Quote Link to comment
bonienl Posted January 26, 2014 Author Share Posted January 26, 2014 Evening all- Probably a dumb question, but what are my options for the web root directory? it defaulted to /tmp/web i believe (not sure where that is located). I tried to change it to a directory on a share on my unraid itself but when i try to open the web page I built by browsing to http://192.168.x.x:81/default.htm'>http://192.168.x.x:81/default.htm i get a 404 not found. Any help is appreciated. When using user shares, you need to include the full path to the folder on the web server settings page, e.g. /mnt/user/<share_name> Though I recommend you put it on a disk share instead, e.g. /mnt/disk1/<folder_name> The content file inside this folder is usually named "index.htm" or "index.html" - as indicated by ijuarez. Then you can simply browse to: http://192.168.x.x:81 Quote Link to comment
althoralthor Posted January 26, 2014 Share Posted January 26, 2014 Sweet! that was my problem (file name and path to share). Thanks ijuarez and bonienl!. Great job on dynamix by the way! Quote Link to comment
maulu5 Posted February 10, 2014 Share Posted February 10, 2014 I had Web Server working fine with phpVirtualbox last week...trying to get plexWatchWeb working with it and now I seem to have broken Web Server. I tried re-installing from scratch, lighttpd -f /etc/lighttpd.conf outputs: 2014-02-10 06:35:06: (network.c.379) can't bind to port: 8086 Address already in use sudo fuser -v 8086/tcp outputs: USER PID ACCESS COMMAND 8086/tcp: root 28205 F.... lighttpd Anyone seen this before? Quote Link to comment
mgb_ Posted February 23, 2014 Share Posted February 23, 2014 I had Web Server working fine with phpVirtualbox last week...trying to get plexWatchWeb working with it and now I seem to have broken Web Server. I tried re-installing from scratch, lighttpd -f /etc/lighttpd.conf outputs: 2014-02-10 06:35:06: (network.c.379) can't bind to port: 8086 Address already in use sudo fuser -v 8086/tcp outputs: USER PID ACCESS COMMAND 8086/tcp: root 28205 F.... lighttpd Anyone seen this before? Yes. I'm getting the same thing. Any ideas? Quote Link to comment
bonienl Posted February 24, 2014 Author Share Posted February 24, 2014 The error message indicates that the TCP port is already in use by another process. Either there are two different processes fighting for the same port, or the same process is launched twice... Quote Link to comment
althoralthor Posted February 25, 2014 Share Posted February 25, 2014 Hey all- Web server for me is working like a champ. I did have one question. Not sure if its possible at all, but can you require user authentication to view the web page in question? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.