安装phpbb 3的时候出现Access denied. (install/app.php/install)

以网站为基石交流:建站技术、网站运营、网络营销等周边话题
回复
头像
admin
网站管理员
帖子: 144
注册时间: 2018年 10月 21日 23:36 星期天
联系:

安装phpbb 3的时候出现Access denied. (install/app.php/install)

帖子 admin »

解决办法:

在nginx配置文件里面直接添加:

代码: 全选


location / {

            # phpBB uses index.htm

            index index.php index.html index.htm;

            try_files $uri $uri/ @rewriteapp;

        }

        location @rewriteapp {

            rewrite ^(.*)$ /app.php/$1 last;

        }

        # Correctly pass scripts for installer

        location /install/ {

            # phpBB uses index.htm

            try_files $uri $uri/ @rewrite_installapp;

            # Pass the php scripts to fastcgi server specified in upstream declaration.

            location ~ \.php(/|$) {

                # Unmodified fastcgi_params from nginx distribution.

                include fastcgi_params;

                # Necessary for php.

                fastcgi_split_path_info ^(.+\.php)(/.*)$;

                fastcgi_param PATH_INFO $fastcgi_path_info;

                fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;

                fastcgi_param DOCUMENT_ROOT $realpath_root;

                try_files $uri $uri/ /install/app.php$is_args$args;

    fastcgi_pass unix:/dev/shm/php-cgi.sock;

    fastcgi_index index.php;

    include fastcgi.conf;

            }

        }

        location @rewrite_installapp {

            rewrite ^(.*)$ /install/app.php/$1 last;

        }
        
       
回复