I'm going crazy with the nginx configuration.
I have this directory tree site
|-- .tmp
| +-- partials
| | |-- partial.js
| | |
| +-- serve
| +-- app
| | |-- app.css
| |
| |-- index.html
|
+-- libs
| +-- folder_a
| |
| +-- folder_b
|
+-- transpiled
| +-- app
| | |-- app.js
Also in my index.html I have the paths like
<script src="../bower_components/jquery/dist/jquery.js"></script>
<script src="app/app.js"></script>
So, if I'm right, my root should be the transpiled directory.
What is a valid nginx configuration for serving my site ?
conf example added
http {
server {
location / {
root html/my_site;
index .tmp/serve/index.html;
try_files $uri transpiled/$uri;
}
}
}
I don't know nginx but i have read something about try_files. try_files directive should search the file $uri into transpiled/$uri. So if i have app/app.js try files should search the file in transpiled/app/app.js
This won't work