upld/INSTALL.txt

65 lines
2.4 KiB
Plaintext

Downloading
===========
First follow the steps below to download the files
- Download the zip file from here (via GitHub)
- Unzip the folder
- Move the files from the public folder to the folder on your server where you want upld installed
Setting everything up
---------------------
Once the files have been copied to your chosen location on the server, follow the steps below to set it up
- Create a new database for the script
- Import upld.sql into the new database
- Update the config.php file with all of your details
- Set the permissions on the images and thumbs folders to 0777
- Head to your domain and register a new account
- In the users table of your database, amend the value of admin to 1
Configuring your webserver for short URLs
-----------------------------------------
Everything should now be set up correctly, but there are some further steps below if you want to use short URLs with lighttpd/Apache
Lighttpd
--------
If the script is installed in the root directory of the webserver, add the following to your lighttpd.conf file
-----------------------------------------------------------------------------------------------
$HTTP["host"] == "domain.com" {
url.rewrite = ( "^/([a-zA-Z0-9]{5})$" => "/view.php?id=$1" )
}
$HTTP["host"] == "i.domain.com" {
server.document-root = "/path/to/upld/script/from/root/images/"
}
-----------------------------------------------------------------------------------------------
If your script is installed in a folder, and not the root directory of your webserver, amend the following and add it to your lighttpd.conf file
-----------------------------------------------------------------------------------------------
$HTTP["host"] == "domain.com" {
# if you have the scripts in a folder, i.e. "folderName" then use amend the rule like below
url.rewrite = ( "^folderName/([a-zA-Z0-9]{5})$" => "/folderName/view.php?id=$1" )
}
$HTTP["host"] == "i.domain.com" {
server.document-root = "/path/to/upld/script/from/root/folderName/images/"
}
-----------------------------------------------------------------------------------------------
Apache
------
Add the following to your Apache config file
-----------------------------------------------------------------------------------------------
<VirtualHost *:80>
DocumentRoot /path/to/upld/script/from/root/images
ServerName i.domain.com
</VirtualHost>
-----------------------------------------------------------------------------------------------