Compare commits

...

3 Commits

Author SHA1 Message Date
6ada2f1b91 nginx samples sites for multiple projects
- add `project-1.conf` and `project-1.conf` to match the docs.
- keep default to work with both multiple and single projects.
- delete the .gitignore.
- update docker-compose and example-env file to match the new settings
- update the docs
- delete `laravel-https.conf` to replace it with documentation instead
2017-03-16 20:53:14 -04:00
aedc7c8438 edit the docs 2017-03-16 19:28:01 -04:00
ec4ccb4a20 Move CNAME from the docs to the DOC.. 2017-03-16 18:33:29 -04:00
18 changed files with 245 additions and 196 deletions

View File

@ -39,14 +39,15 @@ You can request a new feature by submitting an [Issue](https://github.com/larado
Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly. Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly.
1. Install [Hugo](https://gohugo.io/) on your machine (easy steps). 1. Install [Hugo](https://gohugo.io/) on your machine (easy thing).
2. Open the `DOCUMENTATION/_settings/content` and search for the markdown file you want to edit (every folder is a section in the menu). 2. Open the `DOCUMENTATION/_settings/content` and search for the markdown file you want to edit (every folder represents a section in the menu).
3. After done editing, run the this command `hugo` to generate the updated site inside the `docs` folder (It's recommended to delete all files form the `/docs` folder, except the `CNAME` file, before running the `hugo` command). 3. Delete the `/docs` folder from the root.
4. When you finish editing, run the `hugo` command to generate the HTML docs (in the `/docs`).
#### To Host the website locally ### To Host the website locally
Go to `DOCUMENTATION/_settings` in your terminal and run `hugo serve` to host the website locally. Go to `DOCUMENTATION/_settings` in your terminal and run `hugo serve` to host the website locally.
#### Edit the sidebar ### Edit the sidebar
To add a new section to the sidebar or edit existing one, you need to edit this file `DOCUMENTATION/_settings/config.toml`. To add a new section to the sidebar or edit existing one, you need to edit this file `DOCUMENTATION/_settings/config.toml`.

View File

@ -176,6 +176,11 @@ However to view the logs of all the other containers (MySQL, PHP-FPM,...) you ca
docker logs {container-name} docker logs {container-name}
``` ```
More [options](https://docs.docker.com/compose/reference/logs/)
```bash
docker logs -f {container-name}
```

View File

@ -50,12 +50,13 @@ git submodule add https://github.com/Laradock/laradock.git
Your folder structure should look like this: Your folder structure should look like this:
``` ```
- project1 + project-a
- laradock + laradock-a
- project2 + project-b
- laradock + laradock-b
``` ```
(It's important to rename the folders differently in each project)
<a name="A2"></a> <a name="A2"></a>
### A.2) Don't have a PHP project yet: ### A.2) Don't have a PHP project yet:
@ -70,58 +71,59 @@ git clone https://github.com/laradock/laradock.git
Your folder structure should look like this: Your folder structure should look like this:
``` ```
- projects + laradock
- laradock + project-z
- myProject
``` ```
2 - Edit the `docker-compose.yml` file to map to your project directory once you have it (example: `- ../myProject:/var/www`). 2 - Edit your web server sites configuration.
3 - Stop and re-run your docker-compose command for the changes to take place. **In case of NGINX:** open `nginx/sites/default.conf` and change the `root` from `/var/www/public` to `/var/www/{my-project-folder-name}/public`.
*Or you can keep `default.conf` as it is, and create a separate config `my-site.conf` file for it.*
**In case of Apache:** :P
3 - Run your `docker-compose up` command and you're ready to go.
*Note: if you already had your containers up, you might need to take them down first and rebuild them for the changes to take effect.*
```
docker-compose stop && docker-compose up -d XXXX YYYY ZZZZ ....
```
<a name="B"></a> <a name="B"></a>
### B) Setup for Multiple Projects: ### B) Setup for Multiple Projects:
> (Follow these steps if you want a single Docker environment for all project) > (Follow these steps if you want a single Docker environment for all your project)
1 - Clone this repository anywhere on your machine: 1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
```bash ```bash
git clone https://github.com/laradock/laradock.git git clone https://github.com/laradock/laradock.git
``` ```
2 - Edit the `docker-compose.yml` (or the `.env`) file to map to your projects directories: Your folder structure should look like this:
``` ```
applications: + laradock
volumes: + project-1
- ../project1/:/var/www/project1 + project-2
- ../project2/:/var/www/project2
``` ```
3 - You can access all sites by visiting `http://localhost/project1/public` and `http://localhost/project2/public` but of course that's not very useful so let's setup NGINX quickly. 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.
4 - Go to `nginx/sites` and copy `sample.conf.example` to `project1.conf` then to `project2.conf` 3 - change the default names `project-n`:
5 - Open the `project1.conf` file and edit the `server_name` and the `root` as follow: 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.
4 - Add the domains to the **hosts** files.
``` ```
server_name project1.dev; 127.0.0.1 project-1.dev
root /var/www/project1/public; 127.0.0.1 project-2.dev
```
Do the same for each project `project2.conf`, `project3.conf`,...
6 - Add the domains to the **hosts** files.
```
127.0.0.1 project1.dev
``` ```
7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon. 5 - Visit `http://project-1.dev/` and `http://project-2.dev/`.

View File

@ -7,7 +7,7 @@ services:
applications: applications:
image: tianon/true image: tianon/true
volumes: volumes:
- ${APPLICATION_1}:/var/www - ${APPLICATION}:/var/www
### Workspace Utilities Container ########################### ### Workspace Utilities Container ###########################

View File

@ -346,16 +346,17 @@ features, by not reporting duplicate issues.</em></p>
<p>Laradock uses <a href="https://gohugo.io/">Hugo</a> as website generator tool, with the <a href="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p> <p>Laradock uses <a href="https://gohugo.io/">Hugo</a> as website generator tool, with the <a href="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p>
<ol> <ol>
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy steps).</li> <li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy thing).</li>
<li>Open the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder is a section in the menu).</li> <li>Open the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder represents a section in the menu).</li>
<li>After done editing, run the this command <code>hugo</code> to generate the updated site inside the <code>docs</code> folder (It&rsquo;s recommended to delete all files form the <code>/docs</code> folder, except the <code>CNAME</code> file, before running the <code>hugo</code> command).</li> <li>Delete the <code>/docs</code> folder from the root.</li>
<li>When you finish editing, run the <code>hugo</code> command to generate the HTML docs (in the <code>/docs</code>).</li>
</ol> </ol>
<h4 id="to-host-the-website-locally">To Host the website locally</h4> <h3 id="to-host-the-website-locally">To Host the website locally</h3>
<p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p> <p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p>
<h4 id="edit-the-sidebar">Edit the sidebar</h4> <h3 id="edit-the-sidebar">Edit the sidebar</h3>
<p>To add a new section to the sidebar or edit existing one, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code>.</p> <p>To add a new section to the sidebar or edit existing one, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code>.</p>

View File

@ -49,16 +49,17 @@ features, by not reporting duplicate issues.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Laradock uses &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; as website generator tool, with the &lt;a href=&#34;http://themes.gohugo.io/theme/material-docs/&#34;&gt;Material Docs theme&lt;/a&gt;. You might need to check their docs quickly.&lt;/p&gt; &lt;p&gt;Laradock uses &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; as website generator tool, with the &lt;a href=&#34;http://themes.gohugo.io/theme/material-docs/&#34;&gt;Material Docs theme&lt;/a&gt;. You might need to check their docs quickly.&lt;/p&gt;
&lt;ol&gt; &lt;ol&gt;
&lt;li&gt;Install &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; on your machine (easy steps).&lt;/li&gt; &lt;li&gt;Install &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; on your machine (easy thing).&lt;/li&gt;
&lt;li&gt;Open the &lt;code&gt;DOCUMENTATION/_settings/content&lt;/code&gt; and search for the markdown file you want to edit (every folder is a section in the menu).&lt;/li&gt; &lt;li&gt;Open the &lt;code&gt;DOCUMENTATION/_settings/content&lt;/code&gt; and search for the markdown file you want to edit (every folder represents a section in the menu).&lt;/li&gt;
&lt;li&gt;After done editing, run the this command &lt;code&gt;hugo&lt;/code&gt; to generate the updated site inside the &lt;code&gt;docs&lt;/code&gt; folder (It&amp;rsquo;s recommended to delete all files form the &lt;code&gt;/docs&lt;/code&gt; folder, except the &lt;code&gt;CNAME&lt;/code&gt; file, before running the &lt;code&gt;hugo&lt;/code&gt; command).&lt;/li&gt; &lt;li&gt;Delete the &lt;code&gt;/docs&lt;/code&gt; folder from the root.&lt;/li&gt;
&lt;li&gt;When you finish editing, run the &lt;code&gt;hugo&lt;/code&gt; command to generate the HTML docs (in the &lt;code&gt;/docs&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt; &lt;/ol&gt;
&lt;h4 id=&#34;to-host-the-website-locally&#34;&gt;To Host the website locally&lt;/h4&gt; &lt;h3 id=&#34;to-host-the-website-locally&#34;&gt;To Host the website locally&lt;/h3&gt;
&lt;p&gt;Go to &lt;code&gt;DOCUMENTATION/_settings&lt;/code&gt; in your terminal and run &lt;code&gt;hugo serve&lt;/code&gt; to host the website locally.&lt;/p&gt; &lt;p&gt;Go to &lt;code&gt;DOCUMENTATION/_settings&lt;/code&gt; in your terminal and run &lt;code&gt;hugo serve&lt;/code&gt; to host the website locally.&lt;/p&gt;
&lt;h4 id=&#34;edit-the-sidebar&#34;&gt;Edit the sidebar&lt;/h4&gt; &lt;h3 id=&#34;edit-the-sidebar&#34;&gt;Edit the sidebar&lt;/h3&gt;
&lt;p&gt;To add a new section to the sidebar or edit existing one, you need to edit this file &lt;code&gt;DOCUMENTATION/_settings/config.toml&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;To add a new section to the sidebar or edit existing one, you need to edit this file &lt;code&gt;DOCUMENTATION/_settings/config.toml&lt;/code&gt;.&lt;/p&gt;

View File

@ -447,6 +447,11 @@ example for <code>mysql</code> it will be <code>mysql/Dockerfile</code>.</p>
<pre><code class="language-bash">docker logs {container-name} <pre><code class="language-bash">docker logs {container-name}
</code></pre> </code></pre>
<p>More <a href="https://docs.docker.com/compose/reference/logs/">options</a></p>
<pre><code class="language-bash">docker logs -f {container-name}
</code></pre>
<p><br> <p><br>
<a name="PHP"></a></p> <a name="PHP"></a></p>

View File

@ -150,6 +150,11 @@ example for &lt;code&gt;mysql&lt;/code&gt; it will be &lt;code&gt;mysql/Dockerfi
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;docker logs {container-name} &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;docker logs {container-name}
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;More &lt;a href=&#34;https://docs.docker.com/compose/reference/logs/&#34;&gt;options&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;docker logs -f {container-name}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt; &lt;p&gt;&lt;br&gt;
&lt;a name=&#34;PHP&#34;&gt;&lt;/a&gt;&lt;/p&gt; &lt;a name=&#34;PHP&#34;&gt;&lt;/a&gt;&lt;/p&gt;

View File

@ -365,12 +365,14 @@
<p>Your folder structure should look like this:</p> <p>Your folder structure should look like this:</p>
<pre><code>- project1 <pre><code>+ project-a
- laradock + laradock-a
- project2 + project-b
- laradock + laradock-b
</code></pre> </code></pre>
<p>(It&rsquo;s important to rename the folders differently in each project)</p>
<p><a name="A2"></a></p> <p><a name="A2"></a></p>
<h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don&rsquo;t have a PHP project yet:</h3> <h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don&rsquo;t have a PHP project yet:</h3>
@ -386,57 +388,57 @@
<p>Your folder structure should look like this:</p> <p>Your folder structure should look like this:</p>
<pre><code>- projects <pre><code>+ laradock
- laradock + project-z
- myProject
</code></pre> </code></pre>
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your project directory once you have it (example: <code>- ../myProject:/var/www</code>).</p> <p>2 - Edit your web server sites configuration.</p>
<p>3 - Stop and re-run your docker-compose command for the changes to take place.</p> <p><strong>In case of NGINX:</strong> open <code>nginx/sites/default.conf</code> and change the <code>root</code> from <code>/var/www/public</code> to <code>/var/www/{my-project-folder-name}/public</code>.</p>
<pre><code>docker-compose stop &amp;&amp; docker-compose up -d XXXX YYYY ZZZZ .... <p><em>Or you can keep <code>default.conf</code> as it is, and create a separate config <code>my-site.conf</code> file for it.</em></p>
</code></pre>
<p><strong>In case of Apache:</strong> :P</p>
<p>3 - Run your <code>docker-compose up</code> command and you&rsquo;re ready to go.</p>
<p><em>Note: if you already had your containers up, you might need to take them down first and rebuild them for the changes to take effect.</em></p>
<p><a name="B"></a></p> <p><a name="B"></a></p>
<h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3> <h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3>
<blockquote> <blockquote>
<p>(Follow these steps if you want a single Docker environment for all project)</p> <p>(Follow these steps if you want a single Docker environment for all your project)</p>
</blockquote> </blockquote>
<p>1 - Clone this repository anywhere on your machine:</p> <p>1 - Clone this repository anywhere on your machine (similar to <a href="#A2">Steps A.2. from above</a>):</p>
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git <pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
</code></pre> </code></pre>
<p>2 - Edit the <code>docker-compose.yml</code> (or the <code>.env</code>) file to map to your projects directories:</p> <p>Your folder structure should look like this:</p>
<pre><code> applications: <pre><code>+ laradock
volumes: + project-1
- ../project1/:/var/www/project1 + project-2
- ../project2/:/var/www/project2
</code></pre> </code></pre>
<p>3 - You can access all sites by visiting <code>http://localhost/project1/public</code> and <code>http://localhost/project2/public</code> but of course that&rsquo;s not very useful so let&rsquo;s setup NGINX quickly.</p> <p>2 - Go to <code>nginx/sites</code> and create config files to point to different project directory when visiting different domains.</p>
<p>4 - Go to <code>nginx/sites</code> and copy <code>sample.conf.example</code> to <code>project1.conf</code> then to <code>project2.conf</code></p> <p>Laradock by default includes <code>project-1.conf</code> and <code>project-2.conf</code> as working samples.</p>
<p>5 - Open the <code>project1.conf</code> file and edit the <code>server_name</code> and the <code>root</code> as follow:</p> <p>3 - change the default names <code>project-n</code>:</p>
<pre><code> server_name project1.dev; <p>You can rename the config files, project folders and domains as you like, just make sure the <code>root</code> in the config files, is pointing to the correct project folder name.</p>
root /var/www/project1/public;
<p>4 - Add the domains to the <strong>hosts</strong> files.</p>
<pre><code>127.0.0.1 project-1.dev
127.0.0.1 project-2.dev
</code></pre> </code></pre>
<p>Do the same for each project <code>project2.conf</code>, <code>project3.conf</code>,&hellip;</p> <p>5 - Visit <code>http://project-1.dev/</code> and <code>http://project-2.dev/</code>.</p>
<p>6 - Add the domains to the <strong>hosts</strong> files.</p>
<pre><code>127.0.0.1 project1.dev
</code></pre>
<p>7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.</p>
<h2 id="usage">Usage</h2> <h2 id="usage">Usage</h2>

View File

@ -68,12 +68,14 @@
&lt;p&gt;Your folder structure should look like this:&lt;/p&gt; &lt;p&gt;Your folder structure should look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- project1 &lt;pre&gt;&lt;code&gt;+ project-a
- laradock + laradock-a
- project2 + project-b
- laradock + laradock-b
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(It&amp;rsquo;s important to rename the folders differently in each project)&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;A2&#34;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a name=&#34;A2&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;a-2-don-t-have-a-php-project-yet&#34;&gt;A.2) Don&amp;rsquo;t have a PHP project yet:&lt;/h3&gt; &lt;h3 id=&#34;a-2-don-t-have-a-php-project-yet&#34;&gt;A.2) Don&amp;rsquo;t have a PHP project yet:&lt;/h3&gt;
@ -89,57 +91,57 @@
&lt;p&gt;Your folder structure should look like this:&lt;/p&gt; &lt;p&gt;Your folder structure should look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- projects &lt;pre&gt;&lt;code&gt;+ laradock
- laradock + project-z
- myProject
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2 - Edit the &lt;code&gt;docker-compose.yml&lt;/code&gt; file to map to your project directory once you have it (example: &lt;code&gt;- ../myProject:/var/www&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;2 - Edit your web server sites configuration.&lt;/p&gt;
&lt;p&gt;3 - Stop and re-run your docker-compose command for the changes to take place.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;In case of NGINX:&lt;/strong&gt; open &lt;code&gt;nginx/sites/default.conf&lt;/code&gt; and change the &lt;code&gt;root&lt;/code&gt; from &lt;code&gt;/var/www/public&lt;/code&gt; to &lt;code&gt;/var/www/{my-project-folder-name}/public&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker-compose stop &amp;amp;&amp;amp; docker-compose up -d XXXX YYYY ZZZZ .... &lt;p&gt;&lt;em&gt;Or you can keep &lt;code&gt;default.conf&lt;/code&gt; as it is, and create a separate config &lt;code&gt;my-site.conf&lt;/code&gt; file for it.&lt;/em&gt;&lt;/p&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;In case of Apache:&lt;/strong&gt; :P&lt;/p&gt;
&lt;p&gt;3 - Run your &lt;code&gt;docker-compose up&lt;/code&gt; command and you&amp;rsquo;re ready to go.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: if you already had your containers up, you might need to take them down first and rebuild them for the changes to take effect.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;B&#34;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a name=&#34;B&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;b-setup-for-multiple-projects&#34;&gt;B) Setup for Multiple Projects:&lt;/h3&gt; &lt;h3 id=&#34;b-setup-for-multiple-projects&#34;&gt;B) Setup for Multiple Projects:&lt;/h3&gt;
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;(Follow these steps if you want a single Docker environment for all project)&lt;/p&gt; &lt;p&gt;(Follow these steps if you want a single Docker environment for all your project)&lt;/p&gt;
&lt;/blockquote&gt; &lt;/blockquote&gt;
&lt;p&gt;1 - Clone this repository anywhere on your machine:&lt;/p&gt; &lt;p&gt;1 - Clone this repository anywhere on your machine (similar to &lt;a href=&#34;#A2&#34;&gt;Steps A.2. from above&lt;/a&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git clone https://github.com/laradock/laradock.git &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git clone https://github.com/laradock/laradock.git
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2 - Edit the &lt;code&gt;docker-compose.yml&lt;/code&gt; (or the &lt;code&gt;.env&lt;/code&gt;) file to map to your projects directories:&lt;/p&gt; &lt;p&gt;Your folder structure should look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; applications: &lt;pre&gt;&lt;code&gt;+ laradock
volumes: + project-1
- ../project1/:/var/www/project1 + project-2
- ../project2/:/var/www/project2
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;3 - You can access all sites by visiting &lt;code&gt;http://localhost/project1/public&lt;/code&gt; and &lt;code&gt;http://localhost/project2/public&lt;/code&gt; but of course that&amp;rsquo;s not very useful so let&amp;rsquo;s setup NGINX quickly.&lt;/p&gt; &lt;p&gt;2 - Go to &lt;code&gt;nginx/sites&lt;/code&gt; and create config files to point to different project directory when visiting different domains.&lt;/p&gt;
&lt;p&gt;4 - Go to &lt;code&gt;nginx/sites&lt;/code&gt; and copy &lt;code&gt;sample.conf.example&lt;/code&gt; to &lt;code&gt;project1.conf&lt;/code&gt; then to &lt;code&gt;project2.conf&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Laradock by default includes &lt;code&gt;project-1.conf&lt;/code&gt; and &lt;code&gt;project-2.conf&lt;/code&gt; as working samples.&lt;/p&gt;
&lt;p&gt;5 - Open the &lt;code&gt;project1.conf&lt;/code&gt; file and edit the &lt;code&gt;server_name&lt;/code&gt; and the &lt;code&gt;root&lt;/code&gt; as follow:&lt;/p&gt; &lt;p&gt;3 - change the default names &lt;code&gt;project-n&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; server_name project1.dev; &lt;p&gt;You can rename the config files, project folders and domains as you like, just make sure the &lt;code&gt;root&lt;/code&gt; in the config files, is pointing to the correct project folder name.&lt;/p&gt;
root /var/www/project1/public;
&lt;p&gt;4 - Add the domains to the &lt;strong&gt;hosts&lt;/strong&gt; files.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;127.0.0.1 project-1.dev
127.0.0.1 project-2.dev
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do the same for each project &lt;code&gt;project2.conf&lt;/code&gt;, &lt;code&gt;project3.conf&lt;/code&gt;,&amp;hellip;&lt;/p&gt; &lt;p&gt;5 - Visit &lt;code&gt;http://project-1.dev/&lt;/code&gt; and &lt;code&gt;http://project-2.dev/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;6 - Add the domains to the &lt;strong&gt;hosts&lt;/strong&gt; files.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;127.0.0.1 project1.dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt; &lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

View File

@ -563,12 +563,14 @@ QUEUE_HOST=beanstalkd
<p>Your folder structure should look like this:</p> <p>Your folder structure should look like this:</p>
<pre><code>- project1 <pre><code>+ project-a
- laradock + laradock-a
- project2 + project-b
- laradock + laradock-b
</code></pre> </code></pre>
<p>(It&rsquo;s important to rename the folders differently in each project)</p>
<p><a name="A2"></a></p> <p><a name="A2"></a></p>
<h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don&rsquo;t have a PHP project yet:</h3> <h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don&rsquo;t have a PHP project yet:</h3>
@ -584,57 +586,57 @@ QUEUE_HOST=beanstalkd
<p>Your folder structure should look like this:</p> <p>Your folder structure should look like this:</p>
<pre><code>- projects <pre><code>+ laradock
- laradock + project-z
- myProject
</code></pre> </code></pre>
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your project directory once you have it (example: <code>- ../myProject:/var/www</code>).</p> <p>2 - Edit your web server sites configuration.</p>
<p>3 - Stop and re-run your docker-compose command for the changes to take place.</p> <p><strong>In case of NGINX:</strong> open <code>nginx/sites/default.conf</code> and change the <code>root</code> from <code>/var/www/public</code> to <code>/var/www/{my-project-folder-name}/public</code>.</p>
<pre><code>docker-compose stop &amp;&amp; docker-compose up -d XXXX YYYY ZZZZ .... <p><em>Or you can keep <code>default.conf</code> as it is, and create a separate config <code>my-site.conf</code> file for it.</em></p>
</code></pre>
<p><strong>In case of Apache:</strong> :P</p>
<p>3 - Run your <code>docker-compose up</code> command and you&rsquo;re ready to go.</p>
<p><em>Note: if you already had your containers up, you might need to take them down first and rebuild them for the changes to take effect.</em></p>
<p><a name="B"></a></p> <p><a name="B"></a></p>
<h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3> <h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3>
<blockquote> <blockquote>
<p>(Follow these steps if you want a single Docker environment for all project)</p> <p>(Follow these steps if you want a single Docker environment for all your project)</p>
</blockquote> </blockquote>
<p>1 - Clone this repository anywhere on your machine:</p> <p>1 - Clone this repository anywhere on your machine (similar to <a href="#A2">Steps A.2. from above</a>):</p>
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git <pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
</code></pre> </code></pre>
<p>2 - Edit the <code>docker-compose.yml</code> (or the <code>.env</code>) file to map to your projects directories:</p> <p>Your folder structure should look like this:</p>
<pre><code> applications: <pre><code>+ laradock
volumes: + project-1
- ../project1/:/var/www/project1 + project-2
- ../project2/:/var/www/project2
</code></pre> </code></pre>
<p>3 - You can access all sites by visiting <code>http://localhost/project1/public</code> and <code>http://localhost/project2/public</code> but of course that&rsquo;s not very useful so let&rsquo;s setup NGINX quickly.</p> <p>2 - Go to <code>nginx/sites</code> and create config files to point to different project directory when visiting different domains.</p>
<p>4 - Go to <code>nginx/sites</code> and copy <code>sample.conf.example</code> to <code>project1.conf</code> then to <code>project2.conf</code></p> <p>Laradock by default includes <code>project-1.conf</code> and <code>project-2.conf</code> as working samples.</p>
<p>5 - Open the <code>project1.conf</code> file and edit the <code>server_name</code> and the <code>root</code> as follow:</p> <p>3 - change the default names <code>project-n</code>:</p>
<pre><code> server_name project1.dev; <p>You can rename the config files, project folders and domains as you like, just make sure the <code>root</code> in the config files, is pointing to the correct project folder name.</p>
root /var/www/project1/public;
<p>4 - Add the domains to the <strong>hosts</strong> files.</p>
<pre><code>127.0.0.1 project-1.dev
127.0.0.1 project-2.dev
</code></pre> </code></pre>
<p>Do the same for each project <code>project2.conf</code>, <code>project3.conf</code>,&hellip;</p> <p>5 - Visit <code>http://project-1.dev/</code> and <code>http://project-2.dev/</code>.</p>
<p>6 - Add the domains to the <strong>hosts</strong> files.</p>
<pre><code>127.0.0.1 project1.dev
</code></pre>
<p>7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.</p>
<h2 id="usage">Usage</h2> <h2 id="usage">Usage</h2>
@ -840,6 +842,11 @@ example for <code>mysql</code> it will be <code>mysql/Dockerfile</code>.</p>
<pre><code class="language-bash">docker logs {container-name} <pre><code class="language-bash">docker logs {container-name}
</code></pre> </code></pre>
<p>More <a href="https://docs.docker.com/compose/reference/logs/">options</a></p>
<pre><code class="language-bash">docker logs -f {container-name}
</code></pre>
<p><br> <p><br>
<a name="PHP"></a></p> <a name="PHP"></a></p>
@ -1960,16 +1967,17 @@ features, by not reporting duplicate issues.</em></p>
<p>Laradock uses <a href="https://gohugo.io/">Hugo</a> as website generator tool, with the <a href="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p> <p>Laradock uses <a href="https://gohugo.io/">Hugo</a> as website generator tool, with the <a href="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p>
<ol> <ol>
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy steps).</li> <li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy thing).</li>
<li>Open the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder is a section in the menu).</li> <li>Open the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder represents a section in the menu).</li>
<li>After done editing, run the this command <code>hugo</code> to generate the updated site inside the <code>docs</code> folder (It&rsquo;s recommended to delete all files form the <code>/docs</code> folder, except the <code>CNAME</code> file, before running the <code>hugo</code> command).</li> <li>Delete the <code>/docs</code> folder from the root.</li>
<li>When you finish editing, run the <code>hugo</code> command to generate the HTML docs (in the <code>/docs</code>).</li>
</ol> </ol>
<h4 id="to-host-the-website-locally">To Host the website locally</h4> <h3 id="to-host-the-website-locally">To Host the website locally</h3>
<p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p> <p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p>
<h4 id="edit-the-sidebar">Edit the sidebar</h4> <h3 id="edit-the-sidebar">Edit the sidebar</h3>
<p>To add a new section to the sidebar or edit existing one, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code>.</p> <p>To add a new section to the sidebar or edit existing one, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code>.</p>

View File

@ -270,12 +270,14 @@ QUEUE_HOST=beanstalkd
&lt;p&gt;Your folder structure should look like this:&lt;/p&gt; &lt;p&gt;Your folder structure should look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- project1 &lt;pre&gt;&lt;code&gt;+ project-a
- laradock + laradock-a
- project2 + project-b
- laradock + laradock-b
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(It&amp;rsquo;s important to rename the folders differently in each project)&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;A2&#34;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a name=&#34;A2&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;a-2-don-t-have-a-php-project-yet&#34;&gt;A.2) Don&amp;rsquo;t have a PHP project yet:&lt;/h3&gt; &lt;h3 id=&#34;a-2-don-t-have-a-php-project-yet&#34;&gt;A.2) Don&amp;rsquo;t have a PHP project yet:&lt;/h3&gt;
@ -291,57 +293,57 @@ QUEUE_HOST=beanstalkd
&lt;p&gt;Your folder structure should look like this:&lt;/p&gt; &lt;p&gt;Your folder structure should look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- projects &lt;pre&gt;&lt;code&gt;+ laradock
- laradock + project-z
- myProject
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2 - Edit the &lt;code&gt;docker-compose.yml&lt;/code&gt; file to map to your project directory once you have it (example: &lt;code&gt;- ../myProject:/var/www&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;2 - Edit your web server sites configuration.&lt;/p&gt;
&lt;p&gt;3 - Stop and re-run your docker-compose command for the changes to take place.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;In case of NGINX:&lt;/strong&gt; open &lt;code&gt;nginx/sites/default.conf&lt;/code&gt; and change the &lt;code&gt;root&lt;/code&gt; from &lt;code&gt;/var/www/public&lt;/code&gt; to &lt;code&gt;/var/www/{my-project-folder-name}/public&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker-compose stop &amp;amp;&amp;amp; docker-compose up -d XXXX YYYY ZZZZ .... &lt;p&gt;&lt;em&gt;Or you can keep &lt;code&gt;default.conf&lt;/code&gt; as it is, and create a separate config &lt;code&gt;my-site.conf&lt;/code&gt; file for it.&lt;/em&gt;&lt;/p&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;In case of Apache:&lt;/strong&gt; :P&lt;/p&gt;
&lt;p&gt;3 - Run your &lt;code&gt;docker-compose up&lt;/code&gt; command and you&amp;rsquo;re ready to go.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: if you already had your containers up, you might need to take them down first and rebuild them for the changes to take effect.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;B&#34;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a name=&#34;B&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;b-setup-for-multiple-projects&#34;&gt;B) Setup for Multiple Projects:&lt;/h3&gt; &lt;h3 id=&#34;b-setup-for-multiple-projects&#34;&gt;B) Setup for Multiple Projects:&lt;/h3&gt;
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;(Follow these steps if you want a single Docker environment for all project)&lt;/p&gt; &lt;p&gt;(Follow these steps if you want a single Docker environment for all your project)&lt;/p&gt;
&lt;/blockquote&gt; &lt;/blockquote&gt;
&lt;p&gt;1 - Clone this repository anywhere on your machine:&lt;/p&gt; &lt;p&gt;1 - Clone this repository anywhere on your machine (similar to &lt;a href=&#34;#A2&#34;&gt;Steps A.2. from above&lt;/a&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git clone https://github.com/laradock/laradock.git &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git clone https://github.com/laradock/laradock.git
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2 - Edit the &lt;code&gt;docker-compose.yml&lt;/code&gt; (or the &lt;code&gt;.env&lt;/code&gt;) file to map to your projects directories:&lt;/p&gt; &lt;p&gt;Your folder structure should look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; applications: &lt;pre&gt;&lt;code&gt;+ laradock
volumes: + project-1
- ../project1/:/var/www/project1 + project-2
- ../project2/:/var/www/project2
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;3 - You can access all sites by visiting &lt;code&gt;http://localhost/project1/public&lt;/code&gt; and &lt;code&gt;http://localhost/project2/public&lt;/code&gt; but of course that&amp;rsquo;s not very useful so let&amp;rsquo;s setup NGINX quickly.&lt;/p&gt; &lt;p&gt;2 - Go to &lt;code&gt;nginx/sites&lt;/code&gt; and create config files to point to different project directory when visiting different domains.&lt;/p&gt;
&lt;p&gt;4 - Go to &lt;code&gt;nginx/sites&lt;/code&gt; and copy &lt;code&gt;sample.conf.example&lt;/code&gt; to &lt;code&gt;project1.conf&lt;/code&gt; then to &lt;code&gt;project2.conf&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Laradock by default includes &lt;code&gt;project-1.conf&lt;/code&gt; and &lt;code&gt;project-2.conf&lt;/code&gt; as working samples.&lt;/p&gt;
&lt;p&gt;5 - Open the &lt;code&gt;project1.conf&lt;/code&gt; file and edit the &lt;code&gt;server_name&lt;/code&gt; and the &lt;code&gt;root&lt;/code&gt; as follow:&lt;/p&gt; &lt;p&gt;3 - change the default names &lt;code&gt;project-n&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; server_name project1.dev; &lt;p&gt;You can rename the config files, project folders and domains as you like, just make sure the &lt;code&gt;root&lt;/code&gt; in the config files, is pointing to the correct project folder name.&lt;/p&gt;
root /var/www/project1/public;
&lt;p&gt;4 - Add the domains to the &lt;strong&gt;hosts&lt;/strong&gt; files.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;127.0.0.1 project-1.dev
127.0.0.1 project-2.dev
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do the same for each project &lt;code&gt;project2.conf&lt;/code&gt;, &lt;code&gt;project3.conf&lt;/code&gt;,&amp;hellip;&lt;/p&gt; &lt;p&gt;5 - Visit &lt;code&gt;http://project-1.dev/&lt;/code&gt; and &lt;code&gt;http://project-2.dev/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;6 - Add the domains to the &lt;strong&gt;hosts&lt;/strong&gt; files.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;127.0.0.1 project1.dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.&lt;/p&gt;
&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt; &lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
@ -552,6 +554,11 @@ example for &lt;code&gt;mysql&lt;/code&gt; it will be &lt;code&gt;mysql/Dockerfi
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;docker logs {container-name} &lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;docker logs {container-name}
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;More &lt;a href=&#34;https://docs.docker.com/compose/reference/logs/&#34;&gt;options&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;docker logs -f {container-name}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt; &lt;p&gt;&lt;br&gt;
&lt;a name=&#34;PHP&#34;&gt;&lt;/a&gt;&lt;/p&gt; &lt;a name=&#34;PHP&#34;&gt;&lt;/a&gt;&lt;/p&gt;
@ -1687,16 +1694,17 @@ features, by not reporting duplicate issues.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Laradock uses &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; as website generator tool, with the &lt;a href=&#34;http://themes.gohugo.io/theme/material-docs/&#34;&gt;Material Docs theme&lt;/a&gt;. You might need to check their docs quickly.&lt;/p&gt; &lt;p&gt;Laradock uses &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; as website generator tool, with the &lt;a href=&#34;http://themes.gohugo.io/theme/material-docs/&#34;&gt;Material Docs theme&lt;/a&gt;. You might need to check their docs quickly.&lt;/p&gt;
&lt;ol&gt; &lt;ol&gt;
&lt;li&gt;Install &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; on your machine (easy steps).&lt;/li&gt; &lt;li&gt;Install &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; on your machine (easy thing).&lt;/li&gt;
&lt;li&gt;Open the &lt;code&gt;DOCUMENTATION/_settings/content&lt;/code&gt; and search for the markdown file you want to edit (every folder is a section in the menu).&lt;/li&gt; &lt;li&gt;Open the &lt;code&gt;DOCUMENTATION/_settings/content&lt;/code&gt; and search for the markdown file you want to edit (every folder represents a section in the menu).&lt;/li&gt;
&lt;li&gt;After done editing, run the this command &lt;code&gt;hugo&lt;/code&gt; to generate the updated site inside the &lt;code&gt;docs&lt;/code&gt; folder (It&amp;rsquo;s recommended to delete all files form the &lt;code&gt;/docs&lt;/code&gt; folder, except the &lt;code&gt;CNAME&lt;/code&gt; file, before running the &lt;code&gt;hugo&lt;/code&gt; command).&lt;/li&gt; &lt;li&gt;Delete the &lt;code&gt;/docs&lt;/code&gt; folder from the root.&lt;/li&gt;
&lt;li&gt;When you finish editing, run the &lt;code&gt;hugo&lt;/code&gt; command to generate the HTML docs (in the &lt;code&gt;/docs&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt; &lt;/ol&gt;
&lt;h4 id=&#34;to-host-the-website-locally&#34;&gt;To Host the website locally&lt;/h4&gt; &lt;h3 id=&#34;to-host-the-website-locally&#34;&gt;To Host the website locally&lt;/h3&gt;
&lt;p&gt;Go to &lt;code&gt;DOCUMENTATION/_settings&lt;/code&gt; in your terminal and run &lt;code&gt;hugo serve&lt;/code&gt; to host the website locally.&lt;/p&gt; &lt;p&gt;Go to &lt;code&gt;DOCUMENTATION/_settings&lt;/code&gt; in your terminal and run &lt;code&gt;hugo serve&lt;/code&gt; to host the website locally.&lt;/p&gt;
&lt;h4 id=&#34;edit-the-sidebar&#34;&gt;Edit the sidebar&lt;/h4&gt; &lt;h3 id=&#34;edit-the-sidebar&#34;&gt;Edit the sidebar&lt;/h3&gt;
&lt;p&gt;To add a new section to the sidebar or edit existing one, you need to edit this file &lt;code&gt;DOCUMENTATION/_settings/config.toml&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;To add a new section to the sidebar or edit existing one, you need to edit this file &lt;code&gt;DOCUMENTATION/_settings/config.toml&lt;/code&gt;.&lt;/p&gt;

View File

@ -1,6 +1,5 @@
### Application ### Application
# Point to your application code, wish should be available at `/var/www` # Point to your application code, wish should be available at `/var/www`
APPLICATION_1=../
### PHP version (Does not apply for HHVM) ### PHP version (Does not apply for HHVM)
# PHP_VERSION=55 # PHP_VERSION=55

View File

@ -1,2 +0,0 @@
*.conf
!default.conf

View File

@ -3,7 +3,7 @@ server {
listen 80 default_server; listen 80 default_server;
listen [::]:80 default_server ipv6only=on; listen [::]:80 default_server ipv6only=on;
server_name laradock; server_name locahost;
root /var/www/public; root /var/www/public;
index index.php index.html index.htm; index index.php index.html index.htm;

View File

@ -3,8 +3,8 @@ server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
server_name sample.dev; server_name project-1.dev;
root /var/www/sample/public; root /var/www/project-1/public;
index index.php index.html index.htm; index index.php index.html index.htm;
location / { location / {
@ -15,6 +15,8 @@ server {
try_files $uri /index.php =404; try_files $uri /index.php =404;
fastcgi_pass php-upstream; fastcgi_pass php-upstream;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
} }
@ -22,6 +24,11 @@ server {
location ~ /\.ht { location ~ /\.ht {
deny all; deny all;
} }
location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/;
log_not_found off;
}
} }

View File

@ -1,14 +1,10 @@
server { server {
listen 443 default_server; listen 80;
listen [::]:443 default_server ipv6only=on; listen [::]:80;
#ssl on; server_name project-2.dev;
#ssl_certificate /var/certs/cert1.pem; root /var/www/project-2/public;
#ssl_certificate_key /var/certs/privkey1.pem;
server_name laravel;
root /var/www/laravel/public;
index index.php index.html index.htm; index index.php index.html index.htm;
location / { location / {
@ -19,6 +15,8 @@ server {
try_files $uri /index.php =404; try_files $uri /index.php =404;
fastcgi_pass php-upstream; fastcgi_pass php-upstream;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
} }
@ -27,4 +25,11 @@ server {
deny all; deny all;
} }
location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/;
log_not_found off;
}
} }