Hi everybody!
I am relatively new to the nginx world, but I'm very impressed about nearly everything about nginx the performance or the possibilities to customize the configuration. Awesome!
Now i have a very complex problem (from my point of view). Here my scenario. I have developed a web application (a single page app based on backbone.js) and for the content pages (imprint and that stuff) I'm using Wordpress. I want to achieve the following result:
If the user hits my site (example.com) the index.html of the app should be served with all the JavaScript stuff. If the user clicks a link in the footer for example example.com/imprint the content-page of Wordpress should be loaded.
I achieved it to access the app via my main-domain example.com, but all the sub-pages which should be served from Wordpress are only showing "File not found" and the nginx.log tells me:
2013/09/26 23:08:03 [error] 31223#0: *86944 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 91.114.231.224, server: www.example.at, request: "GET /trainer/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.example.at"
Due to the fact that the app is also available on facebook, it can be also reached under app.example.com. So i tried to proxy pass every request to the root of example.com to app.example.com. This works fine, but as mentioned with that configuration Wordpress wont work any longer.
For a better understanding i have attached my config file. There are some things which are work in progress and can be skipped.
Can you give me any hint how to solve my problem and for example if the proxy pass function is maybe the wrong way to go?
Every advice is appreciated!
Edited 1 time(s). Last edit at 09/26/2013 05:09PM by crebuh.