Hello StackOverflowers,
I'm struggling for more than a day on this problem. I have 2 sites, one is the application and one is the front wordpress.
The files are as follow :
- Application : C:/Users/NICOLAS/Documents/www/index.php
- Wordpress : C:/Users/NICOLAS/Documents/www/wordpress/index.php
The problem is that I'm moving from apache to nginx and I can't change the URLs. The mapping must be like that :
- Application : http://test.site/v1/index.php/products/view/shoes must get
- www/index.php/products/view/shoes
- Wordpress : http://test.site/index.php must get
- www/wordpress/index.php
I failed to configure NginX to do that. I dont know why, this configuration makes me headash ! I still don't get the logic of NginX. Here is the important part of my conf :
root C:\Users\NICOLAS\Documents\www;
location ~ ^/v1/(.+\.php.*)$ {
alias "C:/Users/NICOLAS/Documents/www/$1";
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
location ~ / {
alias C:/Users/NICOLAS/Documents/www/wordpress/;
location ~ \.php$ {fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Can you point me out where is my mistake ?
Thank you !