Error in installing StartBBS on Ubuntu and Solution

Source: Internet
Author: User
An error occurred while installing StartBBS in Ubuntu and a solution: Ubuntu12.04php-5.3.27mysql-5.1.68nginx-1.4.2 The following configuration is required before installation (app/config. php): $ config ['base _ url'] = 'HTTP: // www.linuxidc.com/'{}config}'index_page'{}'in

Error in installing StartBBS on Ubuntu and Solution

Ubuntu 12.04

Php-5.3.27

Mysql-5.1.68

Nginx-1.4.2

Before installation, perform the following configuration (app/config. php ):

$ Config ['base _ url'] = 'HTTP: // www.linuxidc.com /';
$ Config ['index _ page'] = 'index. php ';

2.1 Installation Error 404
Add

If (! -E $ request_filename ){
Rewrite ^ (. *) $/index. php? $1 last;
# Rewrite "^/(. *) $"/index. php last;
# Break;
}

As follows:

# Www.linuxidc.com
Server {
Listen 80;
Server_name www.linuxidc.com;

Location /{
Root/home/wzw/workstation/www/linuxidc.com;
Index. php index.htm index.html;
Autoindex on;
}

# Location =/50x.html {
# Root/home/wzw/workstation/www/linuxidc.com;
#}
 
Location ~ \. Php. * $ {
Root/home/wzw/workstation/www/linuxidc.com;
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
Include fastcgi_params;

If (! -E $ request_filename ){
Rewrite ^ (. *) $/index. php? $1 last;
# Rewrite "^/(. *) $"/index. php last;
# Break;
}
}
}

2.2 js and css files cannot be loaded, and the Error 404 is reported. The page data is normal, that is, the php part is normal.
This problem made me crazy for almost a day, mainly because I am not familiar with nginx.

This problem occurs because the location of the configuration added in 2.1 is critical. I previously put it in location /{...} And then try to put
Location /{...} And cause the same problem. Finally, I moved to location ~ \. Php. * $ {...} That's all.

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.