Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

how to configure cakephp 2.3 for nginx on ubuntu 13.04

$
0
0
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

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>