Constructing typecho notes using raspberry pi (3) FAQ on typecho nginx sqlite

Source: Internet
Author: User

Preface

This is a summary to summarize the various problems I encountered throughout the configuration process. in the process of solving these problems, I found that typecho is deployed on a platform that requires complete self-configuration, and there is less relevant information, therefore, it is difficult for me to solve these problems. After that, I want to sort out these problems and solutions. If there are people who need them, I can directly refer to them to avoid detours.

 

1. During typecho installation, the system prompts "sorry, you cannot connect to the database. Please check the database configuration before continuing to install"

The sqlite database used here.

My solution was to manually create a database file.

  create table test(test text);

Creating a database and a table and directing the database directory to this file can solve this problem. However, the nature of this problem is not that the database file does not exist. In fact, typecho can create a database file by itself, this problem occurs because typecho does not have the write permission on the directory.

You can use

   -R  /var/www

To solve. however, the 777 here is too extreme. It is set simply to confirm that typecho can work normally. The 777 here means that all permissions are granted to everyone (including others) r w e, this is actually unreasonable. According to the official documents, 755 is enough.

 

2. If typecho prompts "No configuration file can be created automatically", you must manually create a configuration file and copy the configuration code.

The permission problem persists. typecho does not have the write permission. The solution is the same as above.

 

3. After typecho is configured, ERROR 500 is displayed.

This may be because you have completed the entire configuration process by creating a database and creating a configuration file by yourself. Because typecho does not have the write permission, it cannot complete database initialization, you need to change the permissions.

 

4. After typecho is configured, you cannot open the control panel, except for the home page, which is all 404.

This is caused by PHP path forwarding problems, because many nginx default PHP configuration files are written

/var/~/var/run/php5-

The path location is written in path_info forwarding. change location

location ~ .*\.php(\/.*)*$

You can solve the problem.

 

5. The Intranet access is normal. The typecho homepage accessed through the dynamic domain name of the peanut shell is completely white. The CSS file cannot be loaded and the second-level webpage cannot be opened.

In WordPress, there is a blog address setting that can be used to regulate the pointing and forwarding of second-level domain names. In typecho, there are similar settings, but it is not in the setting, instead, execute install. php is automatically executed at the beginning of the installation program. The address of the first visit to the home page is used as the address of this site. when testing and adjusting the Intranet, we use the Intranet IP address to access Raspberry Pi, instead of using dynamic domain names such as peanut shells. this causes an error in the address settings of the typecho website.

When accessing typecho through a domain name, if we view the HTTP request of the browser, we will find that the requested CSS address is 192.168.1.100 (Raspberry Pi Intranet address) /var/www/css obviously this Intranet address does not make any sense. therefore, we need to reconfigure this parameter.

Use the domain name to re-access Raspberry Pi, such as test.ecip.net/install.php, and run the configuration program again.

 

6. Intranet access is normal and the Internet cannot be accessed through dynamic domain names or IP addresses.

This is because China Telecom shields the default HTTP port (80.

Nginx configuration file needs to be changed

 vim /etc/nginx/sites-available/mysite

 

Change his port to 81 or another

/var/~ .*\.php(\/.*)*/var/run/php5-

Then access test.ecip.net: 81.

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.