In the past, my configuration in apache was as follows: {code...}: if the file to which the URL points does not exist in the server directory, all the URLs will be directed to index. php. The structure is described in the Custom Nginx configuration in the document. Nginx I do not use a configuration Conversion Tool to get the configuration in Ngin... the original configuration in apache is as follows:
RewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^ index.php [QSA,L]
Purpose: if the file to which the URL points does not exist in the server directory, all URLs are directed to index. php.
The structure is described in the Custom Nginx configuration in this document. I do not use a configuration Conversion Tool to get the configuration in Nginx:
# nginx configurationlocation / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php break; }}
But in the cloud view's PHP Spaceconf/nginx_server.inc
After the file is in, the space cannot be opened. I want to ask why!
Reply content:
The configuration in apache is as follows:
RewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^ index.php [QSA,L]
Purpose: if the file to which the URL points does not exist in the server directory, all URLs are directed to index. php.
The structure is described in the Custom Nginx configuration in this document. I do not use a configuration Conversion Tool to get the configuration in Nginx:
# nginx configurationlocation / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php break; }}
But in the cloud view's PHP Spaceconf/nginx_server.inc
After the file is in, the space cannot be opened. I want to ask why!
This problem is solved. Finally, I found the solution in readme OF THE slimphp project, as follows:
location / { try_files $uri $uri/ /index.php?$args; root /opt/src/app;}
Some settings are also made for PHP:
location ~ \.php$ { root /opt/src/app; fastcgi_pass 127.0.0.1:8080; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /opt/src/app/$fastcgi_script_name; include /opt/apps/nginx/conf/fastcgi_params;}
Http://cloudscape.sohu.com/doc/operation/app-conf.shtml
Refer to section 6 "Custom Nginx configuration" in the document.
The nginx custom configuration may conflict with the overall configuration of your project. You can log on to the container to view the configuration and modify the configuration.