WordPress supports the use of fixed links, but in the Ngnix environment, access to the page appears after 404,
In fact, the official document is documented, need to write a separate configuration,
The sample code I configured here is as follows:
server { listen ; server_name www.chaichunyan.com; Access_log /var/log/nginx/access.log main;location/{ root/www/data/xxx; Index
Today configuration items, because static resources need to be shared, create a shared directory to do static resources, and then Java static path reference a soft link, access 4041. Project Resource path:Total 12drwxr-x---3 root root 4096 2 14:12 meta-infdrwxr-x---2 root root 4096 May 2 14:12 sdweblrwxrwxrwx 1 ng Inx Nginx 2 15:15 Static-/var/ckl/static/drwxr-x---5 root root 4096 May 2 14:12 Web-infLink as shared static resource2. Access error
Described below in Nginx's official wiki
The alias directive cannot is used inside a regex-specified location. If you need to does this you must use a combination of rewrite and root.
In the actual use of alias in the following PHP returns 404, and HTML can be displayed normally, the workaround is as follows
Location/{root/opt/www/htdocs/www;Index index.php index.html index.htm;}
location/bbs/{alias/opt/www/htdocs/bbs/;Index index.php index.html inde
inconsistency will appear garbled.If you do not change the encoding before uploading the file, the settings will still be garbled, it is recommended to re-upload the file. If no backup of the original file can be converted using the following command: Forf in ' LS *.html ', do mv $f ' ls $f |iconv-f gbk-t UTF-8 '; Where *.html is the type of file to be converted, can also be changed to *.txt,*.rar is mainly to see what you are files, inside the GBK for the source file encoding type, if you do n
is configured to execute the. php file, PHP-FPM returns to the Nginx default 404 error prompt.
For example, my site doucument_root without test.php, access to this file by grasping the package can see the content returned.
http/1.1 404 Not Found
Date:fri, Dec 08:15:28 GMT content-type:text/html
proxy-connecti
404 Not find error occurs when you use ngnix + git to build an HTTP git access environment. The reason is that you forgot to execute the GIT Update-server-Info command when creating git repository, the file cannot be found when you access git resository through HTTP or HTTPS.The solution is as follows:(1) Go to git Repository[Root @ gjz git] # cd test. Git/(2) execute the update-server-Info command[Root @ g
Use NGINX to achieve load balancing, but the data of a group of servers is not synchronized. It takes some time for the master server to synchronize data to other servers before upstream image.stream.com {server 192.168.1.25: 8088; server 192.168.1.24: 8088; server 192.168.1.23: 8088;} when the user www.2cto.com accesses the image, there is a 60% probability that the file cannot be found. question: How to c
script_filename is written dead. If you modify the value of the root instruction or move the file to another directory, PHP-FPM will return the "no input file specified" error because script_filename in the configuration is dead and does not change with $doucument_root.You can modify the Script_filename configuration as follows:Fastcgi_param script_filename $document _root$fastcgi_script_name;Therefore, do not forget to configure the root command in the server block, otherwise the value of $doc
Tags: HTTP Io OS ar use the for SP file on
When I didn't initially configure lnmp, I opened it in a browser to check whether PHP can parse the webpage. File not found is not surprising. Let's analyze it.Using PHP-FPM to parse PHP, "no input file specified", "file not found" is a common error that makes nginx beginners suffer, the reason is that the PHP-FPM proces
This article describes the content of Nginx + php-fpm File not found. Problem solving records, with a certain reference value, now share to everyone, have the need for friends can refer to
Confirmation of the phenomenon:
Open the browser's developer tool to view the request information
http/1.1 404 Not Found
server:n
Nginx Access PHP files file not found error handling, two casesThis error is common, there are two of the following1. PHP-FPM could not find PHP files executed in Script_filename2. PHP-FPM cannot access the PHP that is being executed, that is, the permissions issueFirst caseIt can be added to your location PHP to return 404 when the file does not exist, instead o
: This article describes the problems found during Nginx deployment. For more information about PHP tutorials, see. 1. during SSH project development, no action is configured when nginx configures the service. nginx does not forward the action request.
It turns out to be as follows:
# JSP is directly processed by tomc
Today on the Mac OS compiled installation Nginx, error: Ld:symbol (s) not found for architecture x86_64, after some tossing and finding, because Nginx relies on the OpenSSL library, view OpenSSL. Config file found that the problem should be Openssl/config script to your system is 64 bit, but will be based on $kernel_bi
Configure the environment with Vagrant, but the dead and alive are ' file not found '
Vagrant version
Vagrant 1.6.5
Directory permissions are
drwxr-xr-x 1 vagrant vagrant
Nginx error message
[error] 2186#0: *32 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.33.1, server: xxx.xxx.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run
Solutions
The code is as follows
Copy Code
[Root@lee ~]#/usr/local/webserver/nginx/sbin/nginxNginx:error while loading shared libraries:libpcre.so.1:cannot open Shared object file:no such file or directory
After searching for data, some Linux systems are found to be a common problem. It is very easy to solve this method
If the 32-bit system
The code is as
PHP-FPM installation Complete, Nginx installation completenetstap-ntl| grep 9000Normal opening of the lower port of the hairIptables-lReturn 9000 port is openPS -aux| grep NginxSend the Nginx process to normal operationBut is static page can access, PHP dynamic page inaccessible, error ' File not found 'Finally find the problem, modify the nginx.confFastcgi_param
: This article mainly introduces deepin (linux)-bash: passenger-install-nginx-module: The command is not found. if you are interested in the PHP Tutorial, refer to it. Passenger has been installed. After linux is restarted, the command % >_So I executed
Source ~ /. Bashrc
And
Rvmsudo ~ /. Rvm/gems/ruby-2.2.1/gems/passenger-5.0.23/bin/passenger-install-nginx-
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.