问题:提示404
原因:没有配置url重写
解决:nginx 不支持pathinfo 模式 需要修改配置,方法如下
STB配置
打开 STB 的 config.php 文件修改如下:
$config[‘uri_protocol’] = “PATH_INFO”;
nginx配置
我使用的是虚拟主机配置
<code>server { <span>listen</span><span>80</span>; server_name www.example.com; rewrite_log on; root /www/web/htdocs/example; <span>index</span><span>index</span>.php <span>index</span>.html <span>index</span>.htm; location / { <span>index</span><span>index</span>.php <span>index</span>.html <span>index</span>.htm; } location ~ .php(<span>$|</span>/) { fastcgi_pass <span>127.0</span>.<span>0</span>.<span>1</span>:<span>9000</span>; fastcgi_index <span>index</span>.php; fastcgi_split_path_info ^(.+.php)(.<span>*)</span><span>$;</span> fastcgi_param PATH_INFO <span>$fastcgi_path_info</span>; fastcgi_param SCRIPT_FILENAME <span>$document_root</span><span>$fastcgi_script_name</span>; include fastcgi_params; } <span>if</span> (!-e <span>$request_filename</span>) { rewrite ^<span>/(.*)$ /index</span>.php/<span>$1</span><span>last</span>; <span>break</span>; } location ~ <span>/.ht { deny all; } }</span></code>
验证码不显示:看看是不是gd扩展的问题,没有安装FreeType
以上就介绍了nginx 환경에서 startBBS 배포 시 레이아웃 오류가 발생하며, 인증코드가 표시되지 않는 문제에 대한 해결방법이 있습니다.,包括了start,nginx方面的内容,希望对PHP教程有兴趣的朋友有所帮助。