Commit | Line | Data |
---|---|---|
c4fba949 JB |
1 | * Installation: |
2 | --------------- | |
3 | ||
4 | * Symfony: | |
5 | ||
6 | We suppose the Symfony framework is already installed with the composer. | |
7 | ||
8 | $ git clone https://git.piment-noir.org/Project_proches_de_moi-server.git /path/to/apache_document_root | |
9 | $ cd /path/to/apache_document_root | |
10 | $ composer install | |
11 | $ cp .env.dist .env | |
12 | $ vi .env | |
13 | edit the line | |
14 | DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name | |
15 | to make it match your database installation | |
16 | $ php/console bin/console doctrine:database:create | |
17 | ||
18 | * Apache: | |
19 | ||
20 | Virtual localhost configuration: | |
21 | ||
22 | <VirtualHost *:80> | |
23 | ServerName domain.tld | |
24 | ||
25 | DocumentRoot /path/to/apache_document_root/public | |
26 | <Directory /path/to/apache_document_root/public> | |
27 | AllowOverride None | |
28 | Order Allow,Deny | |
29 | Allow from All | |
80ec112f | 30 | Require all granted |
c4fba949 JB |
31 | |
32 | <IfModule mod_rewrite.c> | |
33 | Options -MultiViews | |
34 | RewriteEngine On | |
35 | RewriteCond %{REQUEST_FILENAME} !-f | |
36 | RewriteRule ^(.*)$ index.php [QSA,L] | |
37 | </IfModule> | |
38 | </Directory> | |
39 | ||
40 | # uncomment the following lines if you install assets as symlinks | |
41 | # or run into problems when compiling LESS/Sass/CoffeeScript assets | |
42 | # <Directory /path/to/apache_document_root> | |
43 | # Options FollowSymlinks | |
44 | # </Directory> | |
45 | ||
46 | # optionally disable the RewriteEngine for the asset directories | |
47 | # which will allow apache to simply reply with a 404 when files are | |
48 | # not found instead of passing the request into the full symfony stack | |
49 | <Directory /path/to/apache_document_root/public/bundles> | |
50 | <IfModule mod_rewrite.c> | |
51 | RewriteEngine Off | |
52 | </IfModule> | |
53 | </Directory> | |
54 | ErrorLog ${APACHE_LOG_DIR}/domain.tld_error.log | |
55 | CustomLog ${APACHE_LOG_DIR}/domain.tld_access.log combined | |
56 | ||
57 | # optionally set the value of the environment variables used in the application | |
58 | #SetEnv APP_ENV prod | |
59 | #SetEnv APP_SECRET <app-secret-id> | |
60 | #SetEnv DATABASE_URL "mysql://db_user:db_pass@host:3306/db_name" | |
61 | </VirtualHost> | |
62 | ||
63 | * REST resources: | |
64 | ||
65 | Open the tests/curl.txt file for an overview. |