This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I finally got the site working. I'm using Ajenti hosting control panel that replaces Apache with Nginx which I'm very new to. After a bunch of digging, I found a site that gave me an example of the custom config for nginx to replace the htaccess file. Here is what I'm using for that:
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
Most things work. But when trying to go to the Add User page in the backend I get "502 Bad Gateway".
Any ideas?
Thanks!
Hi,
please try with this config:
location / {
try_files $uri $uri/ /index.php$is_args$args
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Please post error message from nginx if you get this 502 Bad Gateway. Mostly you can found this under /var/log/nginx/xxxxxx.log
Regards Crazymodder
Last updated
Thanks. I've tried what you suggested and here's the error from the log (my domain replaced):
2016/02/15 14:01:25 [emerg] 23671#0: unexpected "}" in /etc/nginx/conf.d/exampledomain.conf:20
2016/02/15 14:01:25 [emerg] 23673#0: unexpected "}" in /etc/nginx/conf.d/exampledomain.conf:20
Turns out the code you gave me was just missing the ending ";" in the try_files line. I've corrected that and it all works now. Thanks!!!
1-4 of 4