我已经从版本库(v0.7.65)在Ubuntu上安装了nginx,虽然我的默认站点configuration使用WordPress漂亮的URL和nginx兼容性插件(到目前为止),但它并没有Joomla !. 这里是configuration:
server { listen 80 default; server_name localhost; access_log /var/log/nginx/localhost.access.log; root /var/www/nginx-default; location /wordpress { try_files $uri $uri/ @wordpress; } location /joomla { try_files $uri $uri/ @joomla; } # Configuración para instalaciones de WordPress location @wordpress { fastcgi_pass 127.0.0.1:9120; fastcgi_param SCRIPT_FILENAME $document_root/wordpress/index.php; include fastcgi_params; } # Configuración para instalaciones de Joomla! location @joomla { fastcgi_pass 127.0.0.1:9120; fastcgi_param SCRIPT_FILENAME $document_root/joomla/index.php; include fastcgi_params; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass 127.0.0.1:9120; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
我明白了索引,pipe理员和链接下的一个级别。 也就是说,如果我访问/ joomla / joomla-overview,它的工作原理很好(在Joomla!中启用了友好的URL和Apache mod_rewrite),但是如果我尝试/ joomla / joomla-overview / what-is-new-in-1 -5,我得到一个错误 。
你觉得这里发生了什么? 你知道其他的设置,使其工作,最好在我现在拥有的环境?
预先感谢您的支持。
PS:请,我没有find有关我的问题很多帮助。 我尝试了不同的解决scheme,无济于事。
我不知道这是否已经解决,但这个nginxconfiguration适用于我的joomla安装。
服务器{
server_name example.com;
重写^ http://www.example.com$request_uri永久;
}
服务器{
server_name www.example.com;
根/home/public_html/example.com/public;
error_page 404 /404.html;
try_files $ uri $ uri / /index.php?q=$request_uri;
index index.php index.htm index.html;
#直接提供静态文件
位置〜* ^。+ \。(jpg | jpeg | gif | css | png | js | ico | html)$ {
access_logclosures;
到期30天;
}
位置404.html {
index /404.html;
}
位置〜* .php $ {
#如果需要的话,通过一切手段为fcgi进程使用不同的服务器
fastcgi_pass 127.0.0.1:9000;
包括/ etc / nginx / fastcgi_params;
fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
fastcgi_param QUERY_STRING $ query_string;
fastcgi_param REQUEST_METHOD $ request_method;
fastcgi_param CONTENT_TYPE $ content_type;
fastcgi_param CONTENT_LENGTH $ content_length;
}
location〜/\.ht {
否认一切;
}
}