This guide instructs you on how to install OpenPhoto on Dreamhost. The guide assumes a MySQL installation using the local filesystem for photo storage.
OpenPhoto should be installed in the root directory of a domain or subdomain.
Variables:
- YOURDOMAIN:the subdomain or domain for hosting OpenPhoto
- YOURNAME: your Dreamhost username
- OpenPhotoRoot: the root directory for OpenPhoto (e.g., ~/openphoto)
-
Download and install OpenPhoto
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz tar -zxvf openphoto.tar.gz mv photo-frontend-* OpenPhotoRoot
-
Create directories
mkdir OpenPhotoRoot/src/html/assets/cache chmod 775 OpenPhotoRoot/src/html/assets/cache mkdir OpenPhotoRoot/src/html/photos chmod 775 OpenPhotoRoot/src/html/photos mkdir OpenPhotoRoot/src/userdata chmod 775 OpenPhotoRoot/src/userdata
-
Configure the subdomain or domain. Go to the Dreamhost control panel for managing domains
Domain settings:
- Select the Fully Hosted portion of the configuration panel.
- Do you want the www in your URL? Select "Leave it alone"
- Web directory: Set to OpenPhotoRoot/src/html
- PHP mode: Select the latest version of PHP (use FastCGI configuration)
-
Go to the Dreamhost control panel for managing databases and create a new database and a new user for the database. Remember the hostname (the default should be fine), database name, user name, and password, since you'll need this information during the setup.
-
After waiting a sufficient amount of time for the subdomain name to propagate, use the browser to connect to the new subdomain. You should see a setup page for OpenPhoto which will allow you to configure your OpenPhoto project.
- Select Database: MySQL
- Select File System: Local filesystem
- Enter your local file system credentials: /home/USERNAME/OpenPhotoRoot/src/html/photos
- File system hostname for download URL (Web accessible w/o "http://"): YOURDOMAIN.com/photos
If the setup page is not colorful and well formatted, then the css and javascript files are most likely not being loaded. Possible causes:
- Web directory root is not properly set (check control panel for the subdomain)
- src/html/assets/cache directory is not writeable by Apache (check permissions)
Double check all the parameters. Open the Dreamhost control panel for databases.
If the server says that /setup is not found you may need an htaccess file. As suggested by sokai, create a file in OpenPhotoRoot/src/html called .htaccess with the following contents:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?__route__=/$1 [L,QSA]
# 403 Forbidden for ini files
#RewriteRule \.ini$ - [F,NC]
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen.
Once you complete the three steps your site will be up and running.
ENJOY!