HOWTO-Dropbox-Apache-and-eXtplorer
Version 5 (Rob Freeman, 01/21/2009 09:51 AM)
| 1 | 2 | Rob Freeman | h1. HOWTO: Dropbox, Apache and eXtplorer (on Fedora) |
|---|---|---|---|
| 2 | 1 | ||
| 3 | 1 | NOTE: Replace _[user]_ with the username under which the Dropbox folder is located. |
|
| 4 | 1 | NOTE: Replace _[FQDN]_ with either your IP address or the hostname (or FQDN) which you'll be using to access the interface. |
|
| 5 | 1 | ||
| 6 | 1 | NOTE: This HOWTO assumes that you will be running apache as the user 'apache' and that you have already set up your Dropbox account syncing to your /home/[user]/Dropbox folder |
|
| 7 | 1 | ||
| 8 | 1 | To get Dropbox running with apache and extplorer you need to get the following packages: |
|
| 9 | 1 | <pre> |
|
| 10 | 1 | yum install php httpd |
|
| 11 | 1 | </pre> |
|
| 12 | 1 | ||
| 13 | 1 | Make the VirtualHost director and get permissions / groups correct: |
|
| 14 | 1 | <pre> |
|
| 15 | 1 | mkdir /var/www/dropbox |
|
| 16 | 3 | Rob Freeman | chown apache:apache /var/www/dropbox |
| 17 | 1 | usermod -aG [user] apache |
|
| 18 | 1 | usermod -aG apache [user] |
|
| 19 | 1 | </pre> |
|
| 20 | 1 | ||
| 21 | 1 | Now create and populate an apache virtualhost config file: |
|
| 22 | 1 | <pre> |
|
| 23 | 1 | vim /etc/httpd/conf.d/dropbox.conf |
|
| 24 | 1 | </pre> |
|
| 25 | 1 | Populate it with the following text: |
|
| 26 | 1 | <pre> |
|
| 27 | 1 | NameVirtualHost *:80 |
|
| 28 | 1 | <VirtualHost *:80> |
|
| 29 | 3 | Rob Freeman | DocumentRoot "/var/www/dropbox" |
| 30 | 1 | ServerName [FQDN] |
|
| 31 | 3 | Rob Freeman | <Directory "/var/www/dropbox"> |
| 32 | 1 | allow from all |
|
| 33 | 1 | Options +Indexes |
|
| 34 | 1 | AuthType Basic |
|
| 35 | 1 | AuthName "Dropbox" |
|
| 36 | 1 | AuthUserFile /var/www/passwd |
|
| 37 | 1 | Require valid-user |
|
| 38 | 1 | </Directory> |
|
| 39 | 1 | </VirtualHost> |
|
| 40 | 1 | </pre> |
|
| 41 | 1 | Now add a username / password to access your interface via HTTP auth: |
|
| 42 | 1 | <pre> |
|
| 43 | 1 | htpasswd -cm /var/www/passwd yourusername |
|
| 44 | 1 | chown apache.apache /var/www/passwd |
|
| 45 | 1 | </pre> |
|
| 46 | 1 | Make sure that apache has full group access to your Dropbox folder. |
|
| 47 | 1 | <pre> |
|
| 48 | 1 | chmod g+x /home/[user] |
|
| 49 | 1 | chmod g+rw /home/[user]/Dropbox |
|
| 50 | 1 | find /home/[user]/Dropbox -type d -exec chmod g+x {} \; |
|
| 51 | 1 | </pre> |
|
| 52 | 1 | Download the latest version of eXtplorer from http://extplorer.sourceforge.net/ |
|
| 53 | 1 | <pre> |
|
| 54 | 3 | Rob Freeman | cd /var/www/dropbox |
| 55 | 1 | wget http://heanet.dl.sourceforge.net/sourceforge/extplorer/eXtplorer_2.0.1.zip |
|
| 56 | 1 | unzip eXtplorer*.zip |
|
| 57 | 1 | </pre> |
|
| 58 | 1 | Check we haven't made any mistakes and set the services up: |
|
| 59 | 1 | <pre> |
|
| 60 | 1 | service httpd configtest |
|
| 61 | 1 | service httpd restart |
|
| 62 | 1 | chkconfig httpd on |
|
| 63 | 1 | </pre> |
|
| 64 | 5 | Rob Freeman | You can now log into http://[FQDN] using a browser and the default credentials (admin/admin) and set up your user, pointing the user's "Home directory:" at /home/[user]Dropbox. Once you have set up your user you have the choice to remove the HTTP authentication which we included in the VirtualHost configuration above. Simply comment out (or delete) the following lines from your /etc/httpd/conf.d/dropbox.conf file: |
| 65 | 4 | Rob Freeman | <pre> |
| 66 | 4 | Rob Freeman | AuthType Basic |
| 67 | 4 | Rob Freeman | AuthName "Dropbox" |
| 68 | 4 | Rob Freeman | AuthUserFile /var/www/passwd |
| 69 | 4 | Rob Freeman | Require valid-user |
| 70 | 4 | Rob Freeman | </pre> |
| 71 | 4 | Rob Freeman | |
| 72 | 4 | Rob Freeman | That's it, you're done! |