我有一个安装了CentOS 6.5 Plesk 11.5的专用服务器,我已经打开Nginx来处理PHP文件.
我在Plesk 工具/服务管理中打开了服务:
并在Domains/example.com/Web服务器设置中
我使用CodeIgniter Framework,一切都适用于默认配置.但是当我尝试删除CodeIgniter配置文件中的index.php时(config.php)
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
Run Code Online (Sandbox Code Playgroud)
以前的URL example.com/project/index.php/text变成了example.com/project/text但我无法访问链接并出现以下错误:
没有指定输入文件.
我搜索过,有很多解决方案,没有什么对我有用.Plesk自动为每个域生成Nginx配置.根据指南,我尝试在Domains/example.com/Web Server Settings中的附加nginx指令中添加此代码.
location ~ /project {
try_files $uri $uri/ /index.php?$args;
}
Run Code Online (Sandbox Code Playgroud)
我得到一个不同的错误:
文件未找到.
我应该改变什么,在哪里?我浪费了2天没有成功.
我在example.com.conf中有以下代码,但它是由Plesk自动生成的.
server {
listen IP_IS_HIDDEN:80;
server_name domain.com;
server_name www.example.com;
server_name ipv4.example.com;
client_max_body_size 128m;
root "/var/www/vhosts/example.com/httpdocs";
access_log /var/www/vhosts/system/example.com/logs/proxy_access_log;
if ($host ~* ^www.example.com$) {
rewrite ^(.*)$ http://example.com$1 permanent;
}
location / {
proxy_pass http://IP_IS_HIDDEN:7080;
proxy_set_header Host $host;
proxy_set_header …Run Code Online (Sandbox Code Playgroud)