Q:

how to configure nginx to indicate ’/‘ to my main page

i have a django project and my web static files are at 'web/' directory
here is the structure:
➜  web git:(ycw.alpha) tree -L 4
.
└── forward
    ├── asserts
    │   ├── img
    │   │   ├── background
    │   │   ├── qr
    │   │   └── thumb
    │   └── style
    │       ├── css
    │       └── sass
    ├── index.html
    ├── package.json
    ├── script.js
    ├── source
    └── unit

i have configured Nginx conf and i want nginx to directly indicate to 'web/forward/index.html' when i request my own website 'http://example.com'
i do the thing above like this:
location / {
     index index.html
     root /path/to/my/django/project/;
}

location /index.html {
     alias /path/to/my/django/project/web/forward/index.html;
}

it indeed directly redirects to 'index.html', but the question is there are some references in 'index.html' to some static files such as img or css and the paths are relative paths like './asserts/style/css/index.css' so consequently these files are not found as 404
how can i configure it correctly?

A:

The problem has been solved by changing 'root' in location / to '/path/to/the/index/directory' rather than the root directory of the django project, in this way you can still use relative paths of static resources in html file generally.

