查看Nginx版本号使用命令:nginx -v
查看Apache版本号使用命令:apachectl -v
查看MySQL版本号使用命令:mysql -V
查看PHP版本号使用命令:php -v
在 Nginx 的 html 文件夹下新建文件 Index.php 并 写下 phpinfo() 函数在本地浏览器输出.
网上找了半天,没有找到合适的解决方法,希望遇到同样的问题的同学,解答一下
①.、/etc/nginx/nginx.conf
user www-data www-data;
worker_processes 1;
error_log /home/log/nginx.log crit;
pid /var/run/nginx.pid;
events {
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
gzip on;
gzip_min_length 1k;
gzip_http_version 1.0;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zone crawler $binary_remote_addr 10m;
#log format
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
include vhost/*.conf;
贴一下我的配置
server {
server_name test.com;
index index.html index.htm index.php;
root /home/www/default;
fastcgi_index index.php;
include fcgi.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
location ~ .*\.(js|css)?$ {
# root /var/www/nginx-default;
#}
access_log /home/log/default.log access;
~
php-fpm是安装php后自带的,与nginx无关
nginx没有php-fpm,所以php-fpm不再nginx中
以上就是土嘎嘎小编为大家整理的查看nginx中php相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!