Welcome! Log In Create A New Profile

Advanced

how to configure cakephp 2.3 for nginx on ubuntu 13.04

Posted by samuelr 
how to configure cakephp 2.3 for nginx on ubuntu 13.04
July 31, 2013 09:19AM
I'm trying to run the cakephp 2.3 web server nginx. Found already in some places, but it does not work.

it is the first time I use nginx and I'm also not very good at linux. So forgive me if my question has been very basic.

Reinstalled everything, and now the configuration file nginx this the default.

Someone has already done? get it? You can post an example of how would the settings in the file?

I installed everything ok, in "/ usr / share / nginx / html" I added a folder for testing cake called cake. (Latest version)

below, this setup nginx configuration file called "default", located in " / etc / nginx / sites-available"

PS: how this in localhost it shows the welcome message of nginx and can not access phpmyadmin without problems. But when I try to access localhost / cake he's a "500 internal server error"

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

root /usr/share/nginx/html/public/app/webroot/;
index index.html index.htm index.php;

# Make site accessible from http://localhost/

server_name localhost;

location / {
try_files $uri $uri/ /index.html;
}

location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;

# add the following line in for added security.
try_files $uri =403;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}

}

Thank you
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 129
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready