Hi. I have a digitalocean server running phalcon. But I am not trying to fix my URLs so they are pretty. I had everything working on the default config for Nginx, although I had to go to domain/app/public without rewrites, you know... the "unpretty way."
In an attempt to clean up the urls, so I could go domain.me, i checked out these "installation notes" (https://docs.phalcon.io/en/latest/reference/nginx.html)
I tried all of the configurations (adjusted for my domain, of course), and came up with errors ranging from a simple text "Access denied" to now "502 Bad Gateway" error.
I am not sure what the problem is, I have checked out other similar threads, and they offer little in the way of relevant guidance that I haven't already tried. I want to clarify that everything is installed and working, prior to my adjusting the nginx config.
Here is my current config:
server { listen 80; server_name localhost;
charset utf-8; #access_log /var/log/nginx/host.access.log main; set $root_path '/usr/share/nginx/html/liamhockley-www/hockley_personal/public'; location / { root $root_path; index index.php index.html index.htm; # if file exists return it right away if (-f $request_filename) { break; } # otherwise rewrite it if (!-e $request_filename) { rewrite ^(.+)$ /index.php?_url=$1 last; break; } } location ~ \.php { # try_files $uri =404; fastcgi_index /index.php; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~* ^/(css|img|js|flv|swf|download)/(.+)$ { root $root_path; }
}