GET / по IP
vol-kovtun
vova-zms at yandex.ru
Wed May 21 13:23:04 MSD 2008
FreeBSD-7.0, nginx-0.6.31,
cat nginx.conf| g -v \#
user www;
worker_processes 1;
error_log /var/log/nginx-error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx-access.log main;
sendfile on;
keepalive_timeout 0;
gzip on;
server {
listen 80 default;
server_name localhost;
location / {
root /usr/local/www/phpMyAdmin ;
index index.php index.html index.htm;
autoindex off;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:8888;
fastcgi_index index.php ;
fastcgi_param SCRIPT_FILENAME /usr/local/www/phpMyAdmin$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
}
если в браузере ввожу ДНС имя сервера.. то нормально окриваєт index.php phpmyadmin-а ..
но если ввести IP сервера то просто видаєт в браузере содержание PHP-файла.. тоесть
"<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
.....
"
ето нормально ??
More information about the nginx-ru
mailing list