Corrupt httpd.conf-user file - SOLVED

Questions about hosting a Website, using MySQL, PhP or MariaDB may be posted here.
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://myds.synology.com/support/suppo ... p?lang=enu
2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.

Corrupt httpd.conf-user file - SOLVED

Postby Lauszus » Sat Jun 09, 2012 2:29 am

Hi everybody,
I haven't used the Webserver on my D211j for a long time, but I just installed FTDI drivers and node.js by following these guides: http://hallard.wikidot.com/synomodules and http://www.gridshore.nl/2011/04/04/inst ... -synology/.
The next thing it tried was to go to my diskation's ip to see if my website were still running, since I want to run the script from a webserver, but to my astonishment it wasn't running. So I went into the GUI to see if the service were running - it was running, so I tried to disable the service and reenable the service, but it gave me a error that couldn't start the service, but still the checkbox remained checked.
After that I tried logging in via SSH to restart the service, as described here: http://forum.synology.com/wiki/index.ph ... CLI#apache.
It gave me the following error: "httpd: Syntax error on line 113 of /usr/syno/apache/conf/httpd.conf: /usr/syno/apache/conf/httpd.conf:113: <Directory> was not closed."

So i opened httpd.conf and after that to httpd.conf-user, since httpd.conf is generated by httpd.conf-user, as far as I understand, so I went into httpd.conf-user what was going on. To my big suprise, the end of the were like this:

DocumentRoot "/var/services/web"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />

Add the lines found at the following link to my httpd.conf-user: http://code.google.com/p/synoneuf/issue ... a4f5af19e1

And now the basic html server seems to work correctly, but not php or mysql.
I have no clue what might have caused it, but I think I must have messed up something when I installed the FTDI drivers and node.js. Do anybody out there know how restore the original configuration file?
I'm running DSM 4.0-2228 a DS211j, so if anybody out there got a unmodified version of the httpd.conf-user I would a very happy.

Best Regards
Lauszus
Last edited by Lauszus on Sun Jun 10, 2012 10:52 am, edited 1 time in total.
Lauszus
I'm New!
I'm New!
 
Posts: 4
Joined: Sat Jun 09, 2012 1:43 am

Re: Corrupt httpd.conf-user file

Postby Lauszus » Sun Jun 10, 2012 10:52 am

I have now fixed the problem by reinstalling the firmware, as described here: http://forum.synology.com/wiki/index.ph ... ogy_System

Regards
Lauszus
Lauszus
I'm New!
I'm New!
 
Posts: 4
Joined: Sat Jun 09, 2012 1:43 am

Re: Corrupt httpd.conf-user file - SOLVED

Postby ppsy » Mon Jul 23, 2012 8:11 pm

I was about to install node.js as described here
http://www.gridshore.nl/2011/04/04/inst ... -synology/

So would you deter from doing so? It seems like you ran into serious trouble after doing this...
ppsy
Experienced
Experienced
 
Posts: 146
Joined: Sat Jun 02, 2012 2:10 pm

Re: Corrupt httpd.conf-user file - SOLVED

Postby Lauszus » Tue Jul 24, 2012 8:06 pm

I still don't know what went wrong, but I don't think it has anything to with the installation of node.js. I installed it again afterwards and now everything is working perfect!
In case you would like to know, here are the steps I had to do to make it work:
Code: Select all
ipkg install optware-devel

ipkg remove wget

ipkg install libidn
ipkg install openssl
ipkg install wget-ssl
ipkg install openssl-dev

ipkg install python27
cd /opt/bin
ln -s python2.7 python

mkdir /opt/arm-none-linux-gnueabi/lib_disabled
mv /opt/arm-none-linux-gnueabi/lib/libpthread* /opt/arm-none-linux-gnueabi/lib_disabled
cp /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/
cd /opt/arm-none-linux-gnueabi/lib/
ln -s libpthread.so.0 libpthread.so
ln -s libpthread.so.0 libpthread-2.5.so

cp /opt/lib/libssl.so.0.9.8 /usr/lib
cp /opt/lib/libcrypto.so.0.9.8 /usr/lib

ipkg install git
cd /
git clone https://github.com/joyent/node.git
cd /node
git checkout v0.4.11

vi /node/deps/libeio/wscript
//right after “conf.check(lib=’pthread’, uselib_store=’PTHREAD’)” - https://gist.github.com/1189580
conf.env.append_value('LINKFLAGS', '/opt/lib/libpthread_nonshared.a')

cd /node
./configure --prefix=/opt/node
make
/* Wait a while */
make install

vi /root/.profile
PATH="/opt/node/bin:$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/usr/local/sbin"
. /root/.profile

And these are the steps I had to do, to install NPM:
Code: Select all
curl http://npmjs.org/install.sh | sh
npm config set strict-ssl false
npm config set registry http://registry.npmjs.org/


Regards
Lauszus
Lauszus
I'm New!
I'm New!
 
Posts: 4
Joined: Sat Jun 09, 2012 1:43 am

Re: Corrupt httpd.conf-user file - SOLVED

Postby rebolon » Mon Aug 06, 2012 2:53 pm

Does that mean that we can only use version 0.4.11 of nodejs ?
(tried to compile v0.8 or v0.9 but still fail on :
CC(target) /root/node/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/bn/asm/x86_64-gcc.o
../deps/openssl/openssl/crypto/bn/asm/x86_64-gcc.c: In function ‘bn_mul_add_words’:
../deps/openssl/openssl/crypto/bn/asm/x86_64-gcc.c:117: error: impossible constraint in ‘asm’)
rebolon
I'm New!
I'm New!
 
Posts: 1
Joined: Mon Aug 06, 2012 2:51 pm

Re: Corrupt httpd.conf-user file - SOLVED

Postby Lauszus » Tue Aug 07, 2012 2:06 pm

I'm not sure, I could not get the newest version working, but I saw that a guy at the original blog mentioned that he only used version 0.4, so I tried that and it works just fine! :)
Lauszus
I'm New!
I'm New!
 
Posts: 4
Joined: Sat Jun 09, 2012 1:43 am


Return to Web Server + PHP / MySQL + MariaDB

Who is online

Users browsing this forum: Bing [Bot] and 2 guests