Question
Help configuration - Nginx and Cakephp
Hello!
I'm DoanNam.
Please help me!
I used cakephp and nginx.
My vhost.conf file as follows:
#start vhost.conf
server { listen 80; server_name phimcucnhanh.net; root /www/website/phimcucnhanh.net/app/webroot/; index index.php; access_log /www/website/phimcucnhanh.net/log/access.log; error_log /www/website/phimcucnhanh.net/log/error.log; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi_params1; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } server { listen 80; server_name m.phimcucnhanh.net; root /www/website/m.phimcucnhanh.net/app/webroot/; index index.php; access_log /www/website/m.phimcucnhanh.net/log/access.log; error_log /www/website/m.phimcucnhanh.net/log/error.log; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi_params2; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #fastcgi_param SCRIPT_FILENAME /www/website/phimcucnhanh.net/app/webroot/index.php; } }#End vhost.conf You go to the following link: "http://m.phimcucnhanh.net/ban-cung-lop-my-old-classmate-2014" Then the link: "http://phimcucnhanh.net/ban-cung-lop-my-old-classmate-2014" will see the error message:
Stack Trace / Www / sites / m.phimcucnhanh.net / lib / Cake / Routing / Dispatcher.php line 186 → Controller-> invokeAction (CakeRequest) / Www / sites / m.phimcucnhanh.net / lib / Cake / Routing / Dispatcher.php → line 161 Dispatcher-> _invoke (CommonController, CakeRequest, CakeResponse) / Www / sites / m.phimcucnhanh.net / lib / Cake / Core / Object.php line 97 → Dispatcher-> dispatch (CakeRequest, CakeResponse, array)This proves the link "http://phimcucnhanh.net/ban-cung-lop-my-old-classmate-2014" it is not running in / www/website/phimcucnhanh.net / but if you press f5 a few times is off errors. I've lost so many days yet to fix it. I look forward to the help from you! Thank you very much
Add a comment
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×