When deploying startsBBS in the nginx environment, there are layout errors and solutions to the problem that the verification code cannot be displayed.

WBOY
Release: 2016-07-29 08:50:33
Original
1404 people have browsed it

问题:提示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>
Copy after login

验证码不显示:看看是不是gd扩展的问题,没有安装FreeType
When deploying startsBBS in the nginx environment, there are layout errors and solutions to the problem that the verification code cannot be displayed.

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了When deploying startsBBS in the nginx environment, there are layout errors and solutions to the problem that the verification code cannot be displayed.,包括了start,nginx方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template