Advertisements

Installing AjaXplorer on Ubuntu Server

Instructions are here, reposted for my own convenience:

This is for Ubuntu Server 12.04 64-bit.

edit /etc/apt/sources.list and add to the bottom:

deb http://dl.ajaxplorer.info/repos/apt/ stable main
deb-src http://dl.ajaxplorer.info/repos/apt/ stable main

Then, install the gpg key

wget -O - http://dl.ajaxplorer.info/repos/charles@ajaxplorer.info.gpg.key | sudo apt-key add -

Lastly:

sudo apt-get update
sudo apt-get install ajaxplorer

A few more steps to get it working…

copy the sample config file over (and make it readable by the web server):

cp /usr/share/doc/ajaxplorer/apache2.sample.conf /etc/apache2/sites-enabled/ajaxplorer.conf
chown www-data:www-data /etc/apache2/sites-enabled/ajaxplorer.conf

Restart apache…

service apache2 restart

…or…

/etc/init.d/apache2 restart

Make AjaXplorer redirect to HTTPS… (this is displayed during the initial page visit anyway)

edit /usr/share/ajaxplorer/conf/bootstrap_conf.php and uncomment the following line (or add it to the bottom)

define("AJXP_FORCE_SSL_REDIRECT", true);

If HTTPS doesn’t load, it’s probably because apache isn’t configured for SSL. That’s in the next section.

If you get a warning about Server charset encoding, uncomment this line in /usr/share/ajaxplorer/conf/bootstrap_conf.php

define("AJXP_LOCALE", "en_US.UTF-8");

Lastly, since I have /srv on a separate partition, I want ajaxplorer data stored there. By default it’s stored in /usr/share/ajaxplorer/data, which is actually a symlink to /var/lib/ajaxplorer/data.

mkdir /srv/ajaxplorer
cp -r /var/lib/ajaxplorer/data/* /srv/ajaxplorer
chown -R www-data:www-data /srv/ajaxplorer
rm /usr/share/ajaxplorer/data
ln -s /srv/ajaxplorer /usr/share/ajaxplorer/data

Warning: AjaXplorer will start acting odd if /srv isn’t mounted at boot time. Keep that in mind.

By default, PHP max file upload is 2M, and this setting will carry over to AjaXplorer. In order to increase it, you have to change it in three places.  The AjaXplorer documentation says that this is set by php’s upload_max_filesize, but I’ve found that you also have to change php’s post_max_size to match. (/etc/php5/apache2/php.ini). After which, go into AjaXplorer settings repository, then Global Configurations > Core Configs > Common ‘uploader’ core configs. Expand Limitations, then set File Size to 0 to inherit the PHP setting. (Note: It won’t stay 0, it will auto-set to php’s setting. Keep this in mind if you want to change it later.)

More later…

Advertisements

, ,

  1. #1 by Stefan on April 27, 2013 - 2:34 pm

    Thank you for this artice. I fixed installing ajaxplorer now.

  2. #2 by Alan Osborne on June 6, 2013 - 12:23 am

    Excellent instructions, which I’ve followed precisely. However, I used a Turnkey LAMP Linux build (Debian Squeeze) and I’m a total Linux noob.

    The installation of Ajaxplorer ends up under /usr/share/ajaxplorer, but using the Turnkey webmin I can see that the default server and other existing virtual servers all point to /var/www

    I created a new virtual host that uses /usr/share/ajaxplorer as the document root and server name “sync.vcit.ca”.

    Unfortunately, I’m still getting connected to the default server rather than the new virtual server I created. I would have thought that if there was a name match (sync.vcit.ca) then I would be redirected to the correct virtual server. Guess not…

    • #3 by Mike on June 7, 2013 - 5:25 pm

      You may want to do a manual installation instead.

      • #4 by Alan Osborne on June 19, 2013 - 2:26 am

        Mike, I’ve built a new Ubuntu 12.04 LTS VM and installed Ajaxplorer as per your instructions. I didn’t want to have to type in https://fqdn/ajaxplorer, so I’ve changed the document root in apache2 to point to /usr/share/ajaxplorer instead.

        I’ve finding that the conf, core, data, and plugins folder are browseable, which isn’t good. The installation appears to have included a .htaccess. According to this document: http://ajaxplorer.info/administrator/start/securing-your-installation/, the installation should be secure already, in particular the conf and data folders should be hidden – but they aren’t

        Any ideas how to fix this?

        Thanks!

        • #5 by Mike on June 19, 2013 - 10:38 am

          Check that AllowOverrides is On in apache2.conf. It is off by default.

          • #6 by Alan Osborne on July 1, 2013 - 3:14 pm

            Hi Mike,

            Sorry for the long delay in getting back to you, I forgot I posted to your site and I guess I likewise forgot to subscribe to followup comments by email (I haven’t received any emails).

            Anyways, I forgot to mention in my prior post that I used the command:

            “sudo a2dismod rewrite”

            To enable the rewrite mod. I also enabled the “AllowOverrides” option in apache2.conf.

            Finally, I wanted to change the webroot to point to /usr/share/ajaxplorer so I edited the apache2 « default » and « default-ssl » files to point the document root at /usr/share/ajaxplorer (instead of /var/www), but that didn’t work too well with rewrites enabled.

            Details are here: http://ajaxplorer.info/f/topic/enabling-webdav/#post-66157

            I’ve yet to figure out how to have the rewrite engine enabled while also avoiding the “500 Internal Server Error” message. It seems as though, with rewrite enabled, a rewrite rule is blocking access to the new webroot (/usr/share/ajaxplorer).

            For now, I have reverted everything to match your article and it’s working fine via https://fqdn/ajaxplorer, but I’d really like to get this working using https://fqdn instead.

            Thanks in advance for any ideas you might have on how to get this working!

          • #7 by Mike on July 2, 2013 - 8:16 pm

            I hope ‘a2dismod’ is a typo. That would *disable* rewrite :) ‘a2enmod rewrite’ enables it.

  3. #8 by themrlsk on June 6, 2013 - 10:53 am

    Hello, great tutorial! but the part that i would like is the config of ssl on apache ..
    I suscribe for the comments, stay tuned ! :)

  4. #9 by Franck on August 17, 2013 - 3:46 pm

    Hi Mike. I’m discovering Ajaxplorer so thanks for sharing this clear tutorial.

    One question please: to bypass PHP limits with very big files, what if I upload them via FTP directly in the data folder (/var/lib/ajaxplorer/data by default) ?
    Otherwise any solution to upload big files as fairly as possible ? I’ve tried a java based plugin (don’t remember it’s name at this time) but it returned a classpath error at launch.

    Thanks again.

    • #10 by Mike Beach on August 17, 2013 - 3:48 pm

      I would encourage you to just raise the PHP limits to whatever value to need them to, so Ajaxplorer can do it’s thing.

      However, if the files are very large, or you simply don’t want to raise the limits…yes, you can put them on disk however you like. Just make sure that the web server process has access to them.