Configuration API stored in a file config.yml
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_dbname: teampass_db
database_user: root
database_password: ~
database_prefix: teampass
database_charset: utf8
locale: en
encoder: ~
secret: ~
teampass_salt: ~
endpoint: api
version: v1
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_dbname: teampass_db
database_user: root
database_password: root
database_prefix: teampass
database_charset: utf8
locale: en
encoder: lite
teampass_salt: RnR5ZHeERVyZx3bShrmp4NyzXw3s
endpoint: api
version: v1
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_dbname: teampass_db
database_user: root
database_password: root
database_prefix: teampass
database_charset: utf8
locale: en
encoder: standalone
secret: ThisTokenIsNotSoSecretChangeIt
teampass_salt: RnR5ZHeERVyZx3bShrmp4NyzXw3s
endpoint: api
version: v1
The preferred way for the API running in the production environment, you’ll need to use a fully-featured web server. This document describes several ways to use API with Apache or Nginx.
The minimum configuration to get your application running under Apache is:
<VirtualHost *:80>
ServerName domain.tld
DocumentRoot /var/www/project/web
<Directory /var/www/project/web>
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
ErrorLog /var/log/apache2/project_error.log
CustomLog /var/log/apache2/project_access.log combined
</VirtualHost>
Warning
If your system supports the APACHE_LOG_DIR
variable, you may want
to use ${APACHE_LOG_DIR}/
instead of hardcoding /var/log/apache2/
.
Warning
In Apache 2.4, Order Allow,Deny
has been replaced by Require all granted
.
Hence, you need to modify your Directory
permission settings as follows:
<Directory /var/www/project/web>
Require all granted
# ...
</Directory>
The minimum configuration to get your application running under Nginx is:
server {
server_name domain.tld www.domain.tld;
root /var/www/project/web;
location / {
# try to serve file directly, fallback to front controller
try_files $uri /index.php$is_args$args;
}
location ~ ^/(index|api)\.php(/|$) {
# the ubuntu default
fastcgi_pass unix:/var/run/php5-fpm.sock;
# for running on centos
#fastcgi_pass unix:/var/run/php-fpm/www.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
}