Environment: Alibaba Cloud ubuntu 14.04 nginx 1.8.0 php 5.5.9, with virtual host and multiple applications installed
When I installed weiphp, I checked a lot and learned that nginx does not support phpinfo, rewrite,, and I didn’t quite understand. Then you can open the installation page during installation, but when you click to agree to the agreement, the jump path is abnormal:
http://xx.cn.php/?s=/install/step1.html (but if you change it manually http://xx.cn/install.php?s=/install/step1.html, you can see the detection environment page, but the next step also fails)
This is the situation, please give me some advice... Probably set it up The configuration file of this application is as follows:
server {
listen 80;
server_name xx.cn www.xx.cn;
root /var/www/xx/html/;
index index.php index.html index.htm;
access_log /var/www/xx/logs/access.log;
error_log /var/www/xx/logs/error.log;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
include fastcgi_params;
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name ;
set $path_info ;
}
fastcgi_param SCRIPT_FILENAME /var/www/xx/html$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_read_timeout 240;
}
}
Give you a copy of my configuration, which is also nginx 1.8
That’s it, no need to write a lot
Build thinkphp development environment under ubuntu:
Just change the url mode of TP to rewrite