[APP] WebHosting for firmware V4+ (10/2015)

Fixed perl-fcgi permission issues from unix:/var/run/perl-fcgi.sock to unix:/tmp/perl-fcgi.sock.

For those who already installed my WebHosting Mods prior this fix, _ do not reinstall _, just fix it as below:

# Edit the file below:
nano /etc/nginx/sites-available/default;

# Replace:
upstream perl-fcgi.sock {server unix:/var/run/perl-fcgi.sock;}

# with:
upstream perl-fcgi.sock {server unix:/tmp/perl-fcgi.sock;}

# CTRL+[x] to exit, [y] to confirm save.

# Restart Perl-FCGI daemon.
service perl-fcgi restart;
1 Like

Great, works out of the box.

1 Like

Updated Guides and How to’s on the first post:

  • WebHosting on WDMyCloud V4 Firmwares (Generic)

  • WordPress on WDMyCloud V4 Firmwares (New!)

Hi Nazar

Do you know where i can install “dos2unix” from on the wdcloud on fw4.x ?

thanks

Just use one-liners:-

sed: sed -i 's/\r//' *dos*.txt;

Perl: perl -pi -e 's/\r\n/\n/g' *dos*.txt;

You could even create a script to do that, called dos2unix

dos2unix is a binary itself and since we can’t use apt-get freely on v4 firmwares, we can’t install it from standard Debian repo.

If you’re converting crlf in one of your scripts, just use the one-liners I’ve posted above. If you really need the executable on MyCloud, just take one of the one-liner and place it in a new file e.g. below:

nano /usr/local/bin/dos2unix;

Paste below:

#!/bin/sh

sed -i 's/\r//' $1;
exit $?;

CTRL+[x] to exit, [y] to save.

Make it executable:

chmod 755 /usr/local/bin/dos2unix;

Test`em:

dos2unix dos.txt;

thanks, thats great…
The post answers my other questions also that if the new WD 4.x could use apt directly or not.

dos2unix available in my repo: Repository with software worked on v4 firmware
Also available Apache2/PHP5/MySQL for upgrade existing webserver (Be careful!) or use it inside Chroot (At different port).

Warning! Do not upgrade Apache2/PHP5 using apt-get even on 64k repos. You will definately break something i.e. WD stuffs. Also no point doing this on chroot due to abvious port conflicts unless you changed either of the ports but still two Apache daemons running taking up more resources. Unless you know what you’re doing :smile:

Frankly I don’t fancy using apt-get on MyCloud even on 64k repos due to inconsistent dependency conflicts. If you want to use apt-get, use it on a clean Debian.

Why not? Its standart package manager in Debian-based systems. Its powerful and easy.
Also my repo - is clone of official repo, but all soft rebuilded for support 64k (v4 firmware), so - all dependencies solved.
One more “+”: Is a easy update/upgrade (Yes, sometime i upgrade packages in repo).

As WD also couldn’t use all power of APT/Dpkg/Packages and made a heap of crutches.
In attempt it will be updated - everything will fall off. That it didn’t occur - it is necessary to remove garbage from WD from dependences of normal packages (In /var/lib/dpkg/info/ need remove wd-nas files and edit apache/php and other .info files for remove WD stuff from it)

@Fox_exe

I installed dos2unix from your repo.[http://anionix.ddns.net/dists/wheezy-64k/main/binary-armhf/dos2unix_6.0-1_armhf.deb]. But when i try to run it or try to convert a file it just says “killed”

nas1:/shares/data/Drivers/scripts# dpkg -i dos2unix_6.0-1_armhf.deb
Selecting previously unselected package dos2unix.
(Reading database … 25618 files and directories currently installed.)
Unpacking dos2unix (from dos2unix_6.0-1_armhf.deb) …
Setting up dos2unix (6.0-1) …
Processing triggers for man-db …

nas1:/shares/data/Drivers/scripts# dos2unix test.txt
Killed

@Fox_exe

You quoted only partial of my reply. I said I don’t fancy using apt-get on the MyCloud. But I still use apt-get/aptitude on pure Debian/Ubuntu systems I have. I would have switched MyCloud to pure Debian but I choose not to.

Also your 64k repo is not really maintained all up to date. Just apps and deps that you’ve built manually as I did. Even Jessie/SID is not all 64k updated. This is the main reason I insisted of not maintaining 64k repos despite all the feedback I got. A good example is @alirz1 trying to install a simple dos2unix (advanced users like you and me don’t need this) but get killed attempting to run it. But we still appreciate your effort for the repo though.

And most of all my approach is different from yours. I want users especially all my donors to be able to install all these without messing or removing so called WD garbage. Because unlike you and me, a normal user who doesn’t understand all these could easily break their NAS even with your 64k repo.

@Nazar78

I try to install your package. WebHosting… (FW is v04.04.02-105)
It goes well to point 81 where stops with the message:
Unable to install required file! ‘webhosting-mods_1.0.0’.

Could you tell me what I doing wrong?

Is this on a fresh firmware? Try service perl-fcgi restart;. If you can start the service then it’s good else maybe you could try installing again, usually installation issues occur before point 81.

Yes it’s fresh firmware- I even made full factory restore.
I was trying installation more times but stops every time on the same place and bellow msg,

Installing (81)-> webhosting-mods_1.0.0 2.9KBytes…
Error-1: Unable to install required file! ‘webhosting-mods_1.0.0’

Were you able to successfully run the previous command I mentioned? service perl-fcgi restart; If yes it’s all good.

Hi Nazar. Have evryone or you now testet Owncloud with a MyCloud Mirror?

I’ve helped to install OwnCloud several times, but all on a MyCloud single bay Gen1.

Guide added to the first post: GoDaddy DDNS Updater.

This guide is useful for those who’s using GoDaddy domain and having its DNS records pointing to a dynamic public IP for home based solutions i.e. personal hosting, remote access or remote CCTV surveillance. Hope it helps…