i've tried several configuration instructions and forum posts but nothing worked for me, I still get 502-bad gateway errors when I try to access my website.
$config[“index_page”] = “”;
...
$config[“uri_protocol”] = “REQUEST_URI”; // also tried AUTO
My nginx configuration:
server {
server_name dev.monitr.io;
root /home/monitr/web/dev/www/;
include /etc/sites/ci_vhost;
}
/etc/sites/ci_vhost:
index index.html index.php index.htm;
# set expiration of assets to MAX for caching
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
location / {
# Check if a file exists, or route it to index.php.
try_files $uri $uri/ @rewrites;
}
location @rewrites {
if (!-e $request_filename)
{
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ \.php {
include /etc/nginx/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_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket;
fastcgi_index index.php;
}
kind regards, phillip
Follow instruction to add dotdeb.org to you apt sources. Dotdeb.org has packages of modern nginx and php.
Google "nginx php 5.3" for complete manuals, there are many. Wish you not to compile anything from sources :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.