Author Topic: Apache & Nginx Reverse Proxy problem with cakephp  (Read 2461 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Apache & Nginx Reverse Proxy problem with cakephp
« on: October 22, 2016, 09:00:52 PM »
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.

Offline
*
Re: Apache & Nginx Reverse Proxy problem with cakephp
« Reply #1 on: October 22, 2016, 09:44:13 PM »
I fixed the problem changing my /etc/nginx/conf.d/mywebsite.conf

this stroke
Code: [Select]
root /home/xxxxxx/public_html;to that one
Code: [Select]
root /home/xxxxxx/public_html/webroot;
and also I add this stroke:

Code: [Select]
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?..