1

I have a Google Compute Engine instance(installed apache, php, mysql etc.) and a custom domain name. I can do add my Custom Domain to my Google Compute Engine.

Lets my domain name be www.try.com .

my instance's "www" folder;

--->try
--->somethingelse2
--->somethingelse3
..

How can I set "www.try.com" access to only "try" folder? Thanks.

statistic
  • 162
  • 1
  • 13

1 Answers1

1

In deciding what file to serve for a given request, httpd's default behavior is to take the URL-Path for the request (the part of the URL following the hostname and port) and add it to the end of the DocumentRoot specified in your configuration files. Therefore, the files and directories underneath the DocumentRoot make up the basic document tree which will be visible from the web.

If a directory is requested (i.e. a path ending with /), the file served from that directory is defined by the DirectoryIndex directive. For example, if DocumentRoot were set as above, and you were to set:

DirectoryIndex index.html index.php

You only need to modify the path in the Directory index.

You can find more information here

Katie Sinatra
  • 438
  • 2
  • 10