Server environment settings

WEB server

apache

 apache

No input file specified error on Godaddy virtual host

At present, this problem is mostly found on Godaddy's virtual host, and its configuration is one of the strangest virtual hosts I have ever seen. The first reason for the above error is that PHP does not recognize pathinfo. Because Godaddy uses the cgi mode (presumably to be compatible with both php4 and php5) to run php, some strange problems will occur.

resolvent

Find the php5.ini file in the root directory (create one if you can't find it), and add the following content to it

 cgi.fix_pathinfo = 1

nginx

 nginx

Unable to log in to the background, "405, method not allowed"

This is mainly due to the inherent bug of nginx. Because typecho uses static addresses, and versions before nginx 0.7 do not allow post requests for static addresses, this error will occur.

resolvent

Upgrade nginx to 0.7 or above

Unable to log in to the background, click the foreground link or "404, not found"

This is caused by the failure to support pathinfo when setting nginx. Specific information about php pathinfo can be found on the Internet.

resolvent

Generally, when this happens, The location settings in nginx. conf are similar

 location ~ .*\.php$

To support pathinfo, change to

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

Then add

 set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info;

In some old versions of PHP, you may also need to open cgi.fix_pathinfo in php.ini

 cgi.fix_pathinfo = 1

Unable to realize pseudo static, failed to set in the background

This is mainly caused by the fact that the rewrite of nginx is not set

resolvent

Find the server configuration section of the website in nginx.conf. Generally, we recommend the following configuration

 server { listen          80; server_name     yourdomain.com; root            /home/yourdomain/www/; index           index.html index.htm index.php;   if (!- e $request_filename) { rewrite ^(.*)$ /index.php$1 last; }   location ~ .*\.php(\/.*)*$ { include fastcgi.conf; fastcgi_pass  127.0.0.1:9000; }   access_log logs/yourdomain.log combined; }

 :!: Please change your domain in the above configuration to your own actual domain name and directory storage address

caddy

 yoursite.com { tls [email protected] root /home/wwwroot/yoursite.com gzip fastcgi / 127.0.0.1:9000 php rewrite / { if {path} not_match (/usr/|/admin/) to /index.php{uri} } }
Print/Export
language
  ?