mazma Posted December 20, 2014 Share Posted December 20, 2014 Hey All, Just upgraded to unRaid6.b12. Previously I was running NewzNab on an old mac mini and I'm looking to have this run in my unRaid server instead. I saw there was a MariaDB docker which I've installed but I have no idea on how to progress after that. What about a web server ? Quote Link to comment
lionelhutz Posted December 20, 2014 Share Posted December 20, 2014 I got part way there. Installed MariaDB docker to get a MySQL database. Installed some packages to get subversion working. Installed an Apache docker and pointed it to the www directory in the newznab download. I got a /db/schema.sql file missing error and it won't configure. Quote Link to comment
mazma Posted December 20, 2014 Author Share Posted December 20, 2014 I'm further back as PEAR isn't installed. When I try to install it I get an XML Extension isn't installed error. I checked my Php config and it looks like all the xml is there. Did you have this issue? Quote Link to comment
lionelhutz Posted December 20, 2014 Share Posted December 20, 2014 Where do yo get that PEAR error, when you first open newznab and try to configure? I installed the packages from the old unRAID5 newznab plugin and subversion seemed to work after that. But, my packages directory has other stuff that appears left-over from some plugins I tried and I believe unRAID installs them on boot. I did install apr-1.4.6-x86_64-1.txz. There is a 1.5.0 version but subversion didn't work with it installed. I have since tried pointing the appache docker to the nnplus directory. When I opened it I get a ftp like display so I clicked on the www directory and the newznab config worked. but, only the main newznab page and the admin pages work and the update scripts don't work when running directly on the server. Quote Link to comment
mazma Posted December 20, 2014 Author Share Posted December 20, 2014 Yup, on the pre-flight check of the NewzNab install. Entering Pear on the command line returns "command not found" so I'm guessing its not installed. Downloaded the installer and tried to run: php go-pear.phar as instructed. The installer starts then quits with Beginning install... XML Extension not found Php -m returns: [php Modules] bz2 Core curl date dba dom ereg gmp json libvirt libxml openssl pcre Reflection SimpleXML sockets SPL standard zip zlib which shows the Xml extensions. I have no idea beyond this. My newznab install was on a Mac before. Quote Link to comment
lionelhutz Posted December 20, 2014 Share Posted December 20, 2014 That should be an issue with the Apache docker, not the server. What apache docker did you use? I used one from Tutum. Quote Link to comment
mazma Posted December 20, 2014 Author Share Posted December 20, 2014 I didn't use a docker for Apache - it was some url plugin for unRaid 6. Can't remember where I found it. If you have a docker for it let me know! Quote Link to comment
lionelhutz Posted December 20, 2014 Share Posted December 20, 2014 This is the one I'm using https://registry.hub.docker.com/u/tutum/apache-php/ Quote Link to comment
mazma Posted December 20, 2014 Author Share Posted December 20, 2014 So does this need to be done from the command line or can it be added via the docker app thingy? Quote Link to comment
lionelhutz Posted December 21, 2014 Share Posted December 21, 2014 Add a docker Put Apache for the name and tutum/apache-php for the repository Use /app as the container volume and point the host path to the nnplus/www directory. Use a container port of 80 and a host port of 81. Go to tower:81 to access. I can't get it to work though doing this. What plugin did you use on the server?? Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 ok - got that done. So now I get the db scheme error you mentioned - funny thing was I didn't get that when I used the other apache install. Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 So the schema is located inside the nnplus folder - could is be a path thing when you setup apache? Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 If I remove the www from the host path and go to the install.php page you no longer get the schema error. Quote Link to comment
lionelhutz Posted December 21, 2014 Share Posted December 21, 2014 It appears that the web stuff accesses directories outside of the www directory structure so using the docker to point to the www only can't work because the docker has no access to the rest of the nnplus install. I tried pointing the docker to the nnplus directory and then when you open the web you have to click on the www directory from listing that opens. This didn't work, it seemed that the web setup created files at the wrong level in other nnplus directories. The update scripts did not work and nothing but the main page and the admin pages was accessible. I tried putting /db and /nnplus/db as an extra container volume and host path. I could get through the setup but then I couldn't access the web site after. I'm thinking it might need a docker setup where you link the docker to the nnplus directory but Apache accesses the www subdirectory. I don't know at this point. Running a web server directly on unRAID would be easier but my understanding is that it wasn't possible. Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 For now I just had the host path point at the root of my web server folder. I have MariaDB installed but connect to that. How did you do it? So I'm guessing the php.ini file is inside the docker container? How do you access that? Quote Link to comment
lionelhutz Posted December 21, 2014 Share Posted December 21, 2014 MariaDB - just use you server IP and port 3306 with user=root and no password Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 ok - so you can't access the site afterwards. I seem to remember having this before on the mac setup - pretty sure it had something to do with some apache settings: * mod_rewrite enabled * AllowOverride All set in conf to allow ``.htaccess`` to specify rewrite rules Any idea how to access httpd.conf as its in a container? Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 Looks like you can access the files inside of a running docker by: docker exec -t -i mycontainer /bin/bash where mycontainer os the docker process id which you can get by docker ps Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 Ok, so I can now access the files in the docker and amend the Apache config. When I try to access NewzNab I get this in the apache error log: PHP Fatal error: require_once(): Failed opening required '/app/lib /../../www/config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /app/lib/sphinx.php on line 11 Any idea? Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 I have this 90% done. Once you complete the newznab wizard the website will be blank. This is because a number of changes need to be made to the apache2.conf in addition to making some path changes in one of the newznab files itself. So first connect to your docker running apache by: docker ps (note down the dockers container id) docker exec -t -i "your container id here" /bin/bash This will take you into the docker file. The apache con file is split into multiple parts rather than one big con file which you normally see. So cd /etc/apache2 sudo vi apache2.conf Scroll down and amend the AllowOveride section to All Then :wq out then enable the mod rewrite module. cp mods_available/rewrite.load /etc/apache2/mods-enabled The last part is for newznab itself. The newznab guy tries to php include a bunch of files but the path to them are wrong due to the docker. cd /app/lib sudo vi sphinx.php At the top of this file you will see six includes. Change them to: require_once("/app/config.php"); require_once("/app/lib/framework/db.php"); require_once("/app/lib/category.php"); require_once("/app/lib/nzb.php"); require_once("/app/lib/releasefiles.php"); require_once("/app/lib/util.php"); :wq exit Stop start the apache docker and you should be good. Quote Link to comment
lionelhutz Posted December 21, 2014 Share Posted December 21, 2014 Nice work. You're pointing Apache to the www directory, right? Can you run the update scripts on the unRAID server? Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 Ok, so there is a change to the above. 1. If you haven't already, you have to add a path to the docker to point to your nzbfiles directory. You can't complete the wizard otherwise. 2. I had to amend the docker path to point to the nnplus directory instead of the www directory. If you don't you can't access the misc folder which contains all of the update scripts. I tried to add a docker path to this but it didn't work. 3. Because of the above, you need to update sphinx.php to reflect the new paths - so instead ("/app/config.php"); becomes ("/app/www/config.php"); and so on for the rest of them. 4. You have to connect to the docker to run the scripts. Quote Link to comment
mazma Posted December 21, 2014 Author Share Posted December 21, 2014 Just when you think its all done. If the container id stays the same each time you stop/start the apache docker your changes will remain. Once the container id changes the docker image reverts to its default state, i.e. without your apache changes. Anyone know how to commit the changes into your own image? Quote Link to comment
lionelhutz Posted December 21, 2014 Share Posted December 21, 2014 I'd think by registering on the docker hub and then pushing the new container to your repository. If I get to it before you do I'll try it. Quote Link to comment
mazma Posted December 22, 2014 Author Share Posted December 22, 2014 Cool. Just to let you know the whole thing is running now with CouchPotato, Sickbeard, Sabnzbd, Plex so it is possible. 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.