diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 9867fa4b..c51bfe96 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1021,9 +1021,16 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple 3 - Re-build your PHP-FPM Container `docker-compose build php-fpm`. + +## Install Symfony +The installation is very simple, nothing special. +The NGINX sites include a default config file for your Symfony project `symfony.conf.example`, so edit it and make sure the `root` is pointing to your project web directory. +You mihgt to run `docker-compose restart` if the container are already running. + +Visit `symfony.dev`
diff --git a/DOCUMENTATION/content/getting-started/index.md b/DOCUMENTATION/content/getting-started/index.md index 0aba2e0a..cbbdfb68 100644 --- a/DOCUMENTATION/content/getting-started/index.md +++ b/DOCUMENTATION/content/getting-started/index.md @@ -112,9 +112,9 @@ Your folder structure should look like this: 2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains. -Laradock by default includes `project-1.conf` and `project-2.conf` as working samples. +Laradock by default includes `app.conf.example`, `laravel.conf.example` and `symfony.conf.example` as working samples. -3 - change the default names `project-n`: +3 - change the default names `*.conf`: You can rename the config files, project folders and domains as you like, just make sure the `root` in the config files, is pointing to the correct project folder name. @@ -123,6 +123,7 @@ You can rename the config files, project folders and domains as you like, just m ``` 127.0.0.1 project-1.dev 127.0.0.1 project-2.dev +... ``` > **Now jump to the [Usage](#Usage) section.** diff --git a/nginx/sites/project-1.conf.example b/nginx/sites/app.conf.example similarity index 82% rename from nginx/sites/project-1.conf.example rename to nginx/sites/app.conf.example index cf8872b7..c28eec30 100644 --- a/nginx/sites/project-1.conf.example +++ b/nginx/sites/app.conf.example @@ -3,8 +3,8 @@ server { listen 80; listen [::]:80; - server_name project-1.dev; - root /var/www/project-1/public; + server_name app.dev; + root /var/www/app; index index.php index.html index.htm; location / { @@ -29,4 +29,7 @@ server { root /var/www/letsencrypt/; log_not_found off; } + + error_log /var/log/nginx/app_error.log; + access_log /var/log/nginx/app_access.log; } diff --git a/nginx/sites/project-2.conf.example b/nginx/sites/laravel.conf.example similarity index 79% rename from nginx/sites/project-2.conf.example rename to nginx/sites/laravel.conf.example index cf495fec..dd9a2ae7 100644 --- a/nginx/sites/project-2.conf.example +++ b/nginx/sites/laravel.conf.example @@ -3,8 +3,8 @@ server { listen 80; listen [::]:80; - server_name project-2.dev; - root /var/www/project-2/public; + server_name laravel.dev; + root /var/www/laravel/public; index index.php index.html index.htm; location / { @@ -29,4 +29,7 @@ server { root /var/www/letsencrypt/; log_not_found off; } + + error_log /var/log/nginx/laravel_error.log; + access_log /var/log/nginx/laravel_access.log; } diff --git a/nginx/sites/symfony.conf.example b/nginx/sites/symfony.conf.example new file mode 100644 index 00000000..8d518fee --- /dev/null +++ b/nginx/sites/symfony.conf.example @@ -0,0 +1,28 @@ +server { + + listen 80; + listen [::]:80; + + server_name symfony.dev; + root /var/www/projects/symfony/web; + index index.php index.html index.htm; + + location / { + try_files $uri @rewriteapp; + } + + location @rewriteapp { + rewrite ^(.*)$ /app.php/$1 last; + } + + location ~ ^/(app|app_dev|config)\.php(/|$) { + fastcgi_pass php-upstream; + 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/symfony_error.log; + access_log /var/log/nginx/symfony_access.log; +}