Apache & Nginx Reverse Proxy problem with cakephp

Started by Pegasus, October 22, 2016, 09:00:52 PM

Previous topic - Next topic

Pegasus

Hello.
I just install Nginx using CWP option Apache & Nginx Reverse Proxy.
Trying to install Mighty URL script (short url service), but somehow all of the paths to local *.css *.js files redirects to the home page. As I see Mighty URL script using cakephp library all of the css js files placed inside webroot folder. Looks like ngnix don't understand rewrite.
Part of my virtual hosts using SSL but Mightry URL shortener project working without SSL.
Please help me.

Pegasus

I fixed the problem changing my /etc/nginx/conf.d/mywebsite.conf

this stroke
root /home/xxxxxx/public_html;
to that one
root /home/xxxxxx/public_html/webroot;

and also I add this stroke:


location ~* \.(css|js|ico)$ {
                    try_files $uri =404;
            }

It works but why nginx couldn't use just .htaccess ?.. Why also I should modificate my /ndinx/conf.d/ files?..