ubuntu怎么在线安装php开发环境
1个回答
展开全部
# apt-get install php5-common php5-cli
#apt-get install nginx
#apt-get install php5-fpm
配置nginx
server {
listen 80;
server_name localhost;
root 你的php目录;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
index index.php index.html index.htm server.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
#apt-get install nginx
#apt-get install php5-fpm
配置nginx
server {
listen 80;
server_name localhost;
root 你的php目录;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
index index.php index.html index.htm server.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询