我已经尝试了几个配置说明和论坛帖子,但没有对我有用,当我尝试访问我的网站时,我仍然遇到502错误的网关错误。
$config[“index_page”] = “”;
...
$config[“uri_protocol”] = “REQUEST_URI”; // also tried AUTO
我的nginx配置:
server {
server_name dev.monitr.io;
root /home/monitr/web/dev/www/;
include /etc/sites/ci_vhost;
}
的/ etc /位点/ 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;
}
亲切的问候,菲利普
答案 0 :(得分:1)
Follow instruction将dotdeb.org添加到apt来源。 Dotdeb.org包含现代nginx和php。