Skip to content

Commit

Permalink
Changing app suffix from .dev to .test in order to avoid problem in G…
Browse files Browse the repository at this point in the history
…oogle Chrome 63
  • Loading branch information
HarderWork committed Dec 30, 2017
1 parent d3ea405 commit e714949
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ Note, we recommend using the [FriendsOfCake/app-template](https://github.com/Fri

If you want to access the site using a custom domain name, edit your `/etc/hosts` file to have the following line:

192.168.13.37 www.app.dev app.dev
192.168.13.37 www.app.test app.test

If you are the root user on your box, you can do something like:

```bash
echo "192.168.13.37 www.app.dev app.dev" >> "/etc/hosts"
echo "192.168.13.37 www.app.test app.test" >> "/etc/hosts"
```

### Database Access
Expand Down Expand Up @@ -135,10 +135,10 @@ Next, copy your CakePHP repository to the `apps` directory. For instance, if you
| |-/vagrant/apps/blog
| |-/vagrant/apps/blog/webroot

This application will be automatically available as `blog.dev`. Updating your hosts `/etc/hosts` entry to include this will allow you to access it in a browser:
This application will be automatically available as `blog.test`. Updating your hosts `/etc/hosts` entry to include this will allow you to access it in a browser:

```
echo "192.168.13.37 www.app.dev app.dev blog.dev" >> "/etc/hosts"
echo "192.168.13.37 www.app.test app.test blog.test" >> "/etc/hosts"
```

Using this method, you can host as many applications within a single VM instance as desired.
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/nginx/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"image/jpeg"
]

default['nginx']['server_name'] = 'app.dev'
default['nginx']['server_name'] = 'app.test'
4 changes: 2 additions & 2 deletions cookbooks/nginx/recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
end

template "/etc/nginx/sites-available/default" do
source "app.dev.erb"
source "app.test.erb"
owner "root"
group "root"
mode 0644
Expand All @@ -52,7 +52,7 @@
end

template "/etc/nginx/sites-available/apps" do
source "apps.dev.erb"
source "apps.test.erb"
owner "root"
group "root"
mode 0644
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server {
listen 80;
server_name ~^(?<sname>.+)\.dev;
server_name ~^(?<sname>.+)\.test;
root /vagrant/apps/$sname/webroot;
access_log /var/log/nginx/$sname-access.log;

Expand Down

0 comments on commit e714949

Please sign in to comment.