Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Official Webserver module homepage broken
#1
Hi all,

after the recent damage with my NAS I reinstalled the OS with keeping the RAID.

I did not yet install any 3rd party modules, but instead installed the official-MySQL-kit, WebDisk and official Thecus Webserver; all from "NAS Application". Now, when I try to launch the Webserver from WebUI via "Control Panel --> WebServer", I get a blank page ("http://n4520/adm/getform.html?Module=webserver") with the following text in a single line:

Quote:getCss(); $mod->getHeader(); if($name!=''){ include_once(MODULE_WWW.$module.'/www/'.$name.'.htm'); }else{ include_once(MODULE_WWW.$module.'/www/index.htm'); } $mod->getFooter(); exit; } ?>

Any idea what causes this?

Cheers
tobi

edit: already rebooted the NAS without success
Reply
#2
Hi Tobi,

sure Wink

This is caused by a bug in the FW (reported this in the summer already) and should be fixed in 270 or later releases (I had to manually fix it as Thecus did not take users with existing installations of older OSs into account).

If you do not want to wait or update you may want to create the a file called:

Code:
/etc/httpd/conf.d/zz_fix_htm_issue.conf

The file should contain the following:

Code:
# fix: pass .htm and .html files to php
AddType    application/x-httpd-php php htm html

/Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply
#3
Hi Tobi,

sure Wink

This is caused by a bug in the FW (reported this in the summer already) and should be fixed in 270 or later releases (I had to manually fix it as Thecus did not take users with existing installations of older OSs into account).

If you do not want to wait or update you may want to create the a file called:

Code:
/etc/httpd/conf.d/zz_fix_htm_issue.conf

The file should contain the following:

Code:
# fix: pass .htm and .html files to php
AddType    application/x-httpd-php php htm html

/Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply
#4
fajo Wrote:and should be fixed in 270 or later releases (I had to manually fix it as Thecus did not take users with existing installations of older OSs into account).

If you do not want to wait or update you may want to create the a file called:

Smile I knew you could help Falk, thanks for that.
I'll try your solution but just wanted to mention: I am on OS6.272 I.e. latest OS right now.

After doing new installation of OS I ended up with build 168 or 162, don't know exactly. Than I immediately updates OS...

So, in theory, would I need your manual fix or not?

Cheers
tobi
Reply
#5
fajo Wrote:and should be fixed in 270 or later releases (I had to manually fix it as Thecus did not take users with existing installations of older OSs into account).

If you do not want to wait or update you may want to create the a file called:

Smile I knew you could help Falk, thanks for that.
I'll try your solution but just wanted to mention: I am on OS6.272 I.e. latest OS right now.

After doing new installation of OS I ended up with build 168 or 162, don't know exactly. Than I immediately updates OS...

So, in theory, would I need your manual fix or not?

Cheers
tobi
Reply
#6
Hi Tobi,

this exactly is the problem and I already told Thecus to fix this. They just replaced the httpd config inf the RPM but rpm/yum will never replace any configs that have been altered (i.e. when verify fails), and the config gets altered by the WebUI Wink So, when updating from 16x to 27x the config will not be touched by the installer and the RPM scripts included in the package do not alter the config. So, users will never receive the fix currently as no one has a 27x in eMMC ....

You will have to reboot the NAS or restart/reload apache after creating the file:

Code:
apachectl graceful

Without the fix, many 3rd Party modules will not run either.

/Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply
#7
Wow, OK, now I understand. This sounds like a strange and very dangerous approach.
Are you aware of any other issues one would run into because of this, Falk? As you know, I am still looking for the root-cause of my strange device behaviour where modules stop running and lack the execution rights after OS update.

Would you recommend to upgrade the eMMC with this tutorial and than do reinstallation of OS (with this document?) I mean I just reinstalled the OS, so at the moment I would be in good shape Wink

Thanks, tobi
Reply
#8
Hi Tobi,

it won't help to update eMMC, as the eMMC image is pretty outdated and is being used during initial OS installation anyway.

Creating the file from my previous post will not cause any issues, as it does not alter the configuration files at all. It just causes .htm and .html files to be passed to the PHP interpreter as well. This is what Thecus does with 27x (but they forgot to actually alter existing config files).

Cheers,
Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply
#9
Hi Falk,

thanks for all your patience with a noob and thanks for kindly answering all these questions.
Just created the file and restarted apache as adviced. Now official Apache module is running :-)

Cheers
tobi
Reply
#10
Hi Falk,

thanks for all your patience with a noob and thanks for kindly answering all these questions.
Just created the file and restarted apache as adviced. Now official Apache module is running :-)

Cheers
tobi
Reply
#11
Oh my... sorry to come back to this. Can't start Webserver, get "Webserver start fail! Time out!"

I only did what is recommended in the application note:

1) Stopped Webserver
2) Putting share "naswebsite" to non-public and set ACL for "MyUser"
3) Edit httpd.conf and change user from "User nobody" to "User MyUser". Save file and exit.

Now starting Webserver fails with the above message. I tried to restart complete module from WebUI "NAS Application" with no success. Also reboot didn't help.

Any help appreciated again, Falk. I must have overlooked something, i guess.

Thanks,
tobi

edit: <Test> says "Syntax OK"
Reply
#12
Oh my... sorry to come back to this. Can't start Webserver, get "Webserver start fail! Time out!"

I only did what is recommended in the application note:

1) Stopped Webserver
2) Putting share "naswebsite" to non-public and set ACL for "MyUser"
3) Edit httpd.conf and change user from "User nobody" to "User MyUser". Save file and exit.

Now starting Webserver fails with the above message. I tried to restart complete module from WebUI "NAS Application" with no success. Also reboot didn't help.

Any help appreciated again, Falk. I must have overlooked something, i guess.

Thanks,
tobi

edit: <Test> says "Syntax OK"
Reply
#13
Hi Tobi,

what command did you execute to check the configuration ?

A timeout could be normal (have to check the start script of the module). If I remember right, (older?) official apache start scripts tried to check if apache is running by using lynx to access the server. This often failed due to specific configurations.

I will check the start script ... was it a N4520 ?

Cheers,
Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply
#14
fajo Wrote:what command did you execute to check the configuration ?
I just press "Test" on the module homepage where you can start/stop/test the webserver

fajo Wrote:was it a N4520 ?
Yes

Thank you. It's been a long day for me fighting all the struggles and I do have a cold on top. However even I think I don't have a fever I am doubting myself Wink

/tobi
Reply
#15
Hi Tobi,

these official modules are a pain to read ..... no structure and often such a ugly coding.

The test will not check VHosts, so this could be an issue. Instead of "-t" Thecus should have used "-S".

Please run the following from command line:

Code:
httpd -f /raid/data/naswebsite/conf/httpd.conf -S

If the test is o.k. run:

Code:
# clear log
>/raid/data/naswebsite/logs/error_log
# start the web server
httpd -f /raid/data/naswebsite/conf/httpd.conf -k start

Are there any error messages thrown on the command line or in the error log ?

Cheers,
Falk
Further information und module downloads at FaJo.de

I decided to finally stop module development and maintenance. Existing modules are still available for download for now.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Official Transmission Module 2.92 Hixbot 1 2,729 10-06-2017, 08:15 AM
Last Post: Hixbot
  WebServer Module - Enabling CURL drukman 5 1,639 10-18-2013, 02:12 PM
Last Post: drukman
  WebServer Module 64bit Update drukman 7 2,458 10-14-2012, 04:24 PM
Last Post: Qoolbox
  WebServer Module 64bit Update 0 1,339 Less than 1 minute ago
Last Post:
  WebServer Module - Enabling CURL 0 940 Less than 1 minute ago
Last Post:
  Official Webserver module homepage broken 0 4,956 Less than 1 minute ago
Last Post:

Forum Jump:


Users browsing this thread: 1 Guest(s)