Commit c8365004 authored by Mahmoud Zalt's avatar Mahmoud Zalt

add symfony, laravel and app nginx sites sampels

parent d32cfb31
......@@ -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`.
<a name="Install-Symfony"></a>
## 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`
<br>
<a name="Misc"></a>
......
......@@ -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.**
......
......@@ -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;
}
......@@ -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;
}
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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment