-
Notifications
You must be signed in to change notification settings - Fork 8
Create internal domain
Sebastian Szwed edited this page Sep 2, 2016
·
2 revisions
- Got to Hosted Zones in Route 53
- Click Create Hosted Zone
- Choose your internal domain name
- Change Type to Private Hosted Zone for Amazon VPC
- Select VPC ID where you want to have internal domain
- Click Create - It will automatically open details for newly created hosted zone
- Click Create Record Set
- Type
*
in Name field - Set Type to A - IPv4 address
- Enter NGINX EIP address to Value field
- Click Create
- Go to NGINX instance
- Create new config file in
/etc/nginx/sites-available/
with this content:
server {
listen 80;
listen 443 ssl;
server_name my.domain.internal *.my.domain.internal;
allow 52.59.4.164/32;
allow 52.59.130.131/32;
deny all;
location / {
proxy_pass http://api;
proxy_set_header Host $host;
}
}
Where my.domain.internal is only example and you should change it to your internal domain.
- Create symbolic link to this file in /etc/nginx/sites-enabled/
ln -s /etc/nginx/sites-available/internal.conf /etc/nginx/sites-enabled/internal.conf
Where internal.conf is only example and you can name file differently.
- Reload NGINX
sudo service nginx reload
- Log in to Cloud Foundry CLI as user with admin privileges.
cf login
- Create domain:
-
shared (available in all organizations)
cf create-shared-domain my.domain.internal ```
-
private (available only in one organization)
cf create-domain org-for-my-internal-domain my.domain.internal ```
- Push app with specified your internal domain as domain in manifest.yml