Skip to content

Commit b4fecf7

Browse files
committed
Added domain name
To prevent search engine bots from indexing server ip and direct server ip access by users
1 parent 4f16e37 commit b4fecf7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### Running the project
44
1. Run `git clone https://github.com/SamWanekeya/dockerizing-react-js-with-nginx-and-self-signed-ssl-certificate.git .`
5+
2. Be sure to replace `samwanekeya.com` domain with your own domain
56
4. Run `sh frontend_deploy.sh` from the project root folder to build the images and run the containers
67
5. Run `sh frontend_destroy.sh` from the project root folder to destroy the running containers
78
6. Test it out at [https://localhost](https://localhost). No mounted folders. To apply changes, the image must be re-built.

docker/nginx.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ http {
2020
server {
2121
listen 80 default_server;
2222
listen [::]:80 default_server ipv6only=on;
23-
server_name _;
23+
server_name samwanekeya.com;
2424
root /usr/share/nginx/html;
2525
index index.html index.htm index.nginx-debian.html;
2626
return 301 https://$host$request_uri;
@@ -29,7 +29,7 @@ http {
2929
server {
3030
listen 443 ssl;
3131
listen [::]:443 ssl ipv6only=on;
32-
server_name _;
32+
server_name samwanekeya.com;
3333
# MIME
3434
include /etc/nginx/mime.types;
3535
default_type application/octet-stream;

docker/nginxconfig/security.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ add_header Referrer-Policy "no-referrer-when-downgrade";
2828
# more: http://www.html5rocks.com/en/tutorials/security/content-security-policy/#inline-code-considered-harmful
2929
# add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'";
3030
#For Clouflare users comment this out as it's handle from the admin UI
31-
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
31+
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
32+
# Prevent search engine indexing
33+
#add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";

0 commit comments

Comments
 (0)