小编Ami*_*min的帖子

用于Codeigniter的NGINX服务器配置

/etc/nginx/conf.d/default.conf

server{
listen 80;
listen [::]:80;
server_name  192.168.56.101 192.168.101.100 localhost;
root   /var/www/html;
index index.php index.html index.htm;

location / {
    try_files $uri $uri/ =404;
}

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;

location = /50x.html {
    root /var/www/html;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}


location ~ /\.ht {
    deny all;
}
}
Run Code Online (Sandbox Code Playgroud)

我的codeigniter文件夹位于/ var / www / html / ci中的'ci',我需要什么配置来进行URL重写?...

php codeigniter nginx centos7

6
推荐指数
2
解决办法
1万
查看次数

NGINX安装错误

当我安装了运行良好的 nginx 时使用 Linux Mint 18.3。由于某种原因我需要卸载它,我使用命令卸载它:

sudo apt purge nginx -y
sudo rm -rf /etc/nginx
sudo apt autoremove
Run Code Online (Sandbox Code Playgroud)

然后当我稍后再次需要它时,我尝试了:

sudo apt install nginx -y
Run Code Online (Sandbox Code Playgroud)

它告诉我以下错误:这是来自终端的所有行:

sudo apt install nginx -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  nginx-common nginx-core
Suggested packages:
  fcgiwrap nginx-doc
The following NEW packages will be installed:
  nginx nginx-common nginx-core
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 …
Run Code Online (Sandbox Code Playgroud)

ubuntu nginx linux-mint

4
推荐指数
2
解决办法
7350
查看次数

Codeigniter 3 HMVC 已被破坏

在 Codeigniter 中使用这个 HMVC 插件。( https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/src/codeigniter-3.x/ )

在另一台服务器上运行良好,但在这台服务器上我收到此错误!

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: MX/Router.php

Line Number: 239

Backtrace:

File: /var/www/project.test/public/application/third_party/MX/Router.php
Line: 239
Function: strpos

File: /var/www/project.test/public/application/third_party/MX/Router.php
Line: 101
Function: _set_default_controller

File: /var/www/project.test/public/index.php
Line: 324
Function: require_once
Run Code Online (Sandbox Code Playgroud)

php codeigniter hmvc codeigniter-3

4
推荐指数
3
解决办法
7365
查看次数

标签 统计

codeigniter ×2

nginx ×2

php ×2

centos7 ×1

codeigniter-3 ×1

hmvc ×1

linux-mint ×1

ubuntu ×1