|
|
# Install Framadate
|
|
|
|
|
|
## Form
|
|
|
Browse to `https://mywebsite.tld/framadate`. You should arrive on a screen checking the state of the install that will allow you, if every requirement is met, to proceed to the settings install form.
|
|
|
You need to get inside your server's web directory, such as `/var/www/html` on Debian (or Ubuntu).
|
|
|
|
|
|
On the next screen, you need to fill the form with the following fields :
|
|
|
|
|
|
The field `Connection string` contains the `<HOST>` variable that must be replaced with the host name of your database server, for instance `localhost`. It also contains the `<SCHEMA>` variable that must be replaced with the database name that you have previously chosen. If you followed previous recomendations, it should just be `framadate`.
|
|
|
|
|
|
Once the form filled and sent, the file `app/inc/config.php` will be generated and you will be redirected to the migration page.
|
|
|
|
|
|
The migration page handles:
|
|
|
- Installing the whole database
|
|
|
- Updating the database when the app has new updates.
|
|
|
|
|
|
> Warning: loading the migration page can take a while because it's applying all required database upgrades !
|
|
|
```bash
|
|
|
cd /var/www/html
|
|
|
```
|
|
|
|
|
|
## Advanced settings
|
|
|
Create the Framadate directory and set ownership:
|
|
|
```bash
|
|
|
mkdir framadate
|
|
|
chown www-data: framadate
|
|
|
cd framadate
|
|
|
```
|
|
|
|
|
|
Advanced settings must be manually filled inside `app/inc/config.php`, like the SMTP credentials or the default poll duration.
|
|
|
You can install the stable release or the development version. If you don't know what to choose, choose the stable release.
|
|
|
|
|
|
## URL Rewriting
|
|
|
## Stable release
|
|
|
|
|
|
To have fancy URLs, activate URL rewriting by activating the provided `.htaccess` file, by renaming it from `htaccess.txt` to `.htaccess`:
|
|
|
Download and unzip the latest stable release of Framadate
|
|
|
```bash
|
|
|
wget https://framasoft.frama.io/framadate/latest.zip -P /tmp
|
|
|
sudo -u www-data unzip /tmp/latest.zip
|
|
|
```
|
|
|
|
|
|
You can delete the archive:
|
|
|
```bash
|
|
|
mv htaccess.txt .htaccess
|
|
|
rm /tmp/latest.zip
|
|
|
```
|
|
|
|
|
|
## Secure admin section
|
|
|
## Development version
|
|
|
|
|
|
The `/admin` folder shouldn't be open to anyone but the admin of the Framadate instance, you should secure it with `.htaccess` and `.htpasswd` files.
|
|
|
You will need Composer, php7.0-mbstring and php7.0-xml (On Debian 9: `apt install php7.0-mbstring php7.0-xml`, then [install Composer](https://getcomposer.org/doc/00-intro.md))
|
|
|
|
|
|
Create a `.htaccess` file inside `admin/` and put the following content:
|
|
|
Clone the repository:
|
|
|
```bash
|
|
|
sudo -u www-data git clone https://framagit.org/framasoft/framadate.git/
|
|
|
```
|
|
|
|
|
|
```apache
|
|
|
AuthType Basic
|
|
|
AuthName "Administration"
|
|
|
AuthUserFile "/var/www/framadate/admin/.htpasswd"
|
|
|
Require valid-user
|
|
|
Install dependencies:
|
|
|
```bash
|
|
|
cd framadate
|
|
|
sudo -u www-data composer install
|
|
|
```
|
|
|
|
|
|
Then create the `.htpasswd` file with the following command (you may need to install the package `apache2-utils`) where you change the values for user and password to your convenience:
|
|
|
# Common part: log file
|
|
|
|
|
|
A log file `admin/stdout.log` must be created and be writable by your web server. Something like that should do it:
|
|
|
```bash
|
|
|
sudo -u www-data htpasswd -bc /var/www/framadate/admin/.htpasswd user password
|
|
|
cd framadate
|
|
|
sudo -u www-data touch admin/stdout.log
|
|
|
sudo chmod 600 admin/stdout.log
|
|
|
```
|
|
|
|
|
|
In order to disallow read access the the `.htaccess` and `.htpasswd` files, you can add this section to the `.htaccess` file:
|
|
|
```apache
|
|
|
<FilesMatch "^\.ht.*">
|
|
|
deny from all
|
|
|
satisfy all
|
|
|
ErrorDocument 403 "Forbidden"
|
|
|
</FilesMatch>
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
You can now begin to [configure Framadate](Install/Configure). |