visualbox 网页服务器,无法看到VirtualBox NGINX站点

我正在尝试在Oracle VM VirtualBox内的本地Debian Linux下运行的NGINX服务器上安装多个网站。无法看到VirtualBox NGINX站点

版本: 的Oracle VM VirtualBox:4.3.10,Debian的:喘息,NGINX:1.2.1

的/etc/nginx/nginx.conf文件:

user www-data;

worker_processes 1;

pid /var/run/nginx.pid;

events {

worker_connections 768;

# multi_accept on;

}

http {

autoindex on;

index index.html index.htm index.php;

sendfile off;

tcp_nopush on;

tcp_nodelay on;

keepalive_timeout 30;

types_hash_max_size 2048;

include /etc/nginx/mime.types;

default_type application/octet-stream;

error_page 404 = /usr/share/nginx/www/404.html;

access_log /var/log/nginx/access.log;

error_log /var/log/nginx/error.log warn;

gzip on;

gzip_disable "msie6";

include /etc/nginx/conf.d/*.conf;

include /etc/nginx/sites-enabled/*;

}

/etc/nginx/sites-available/default file:

server {

listen 80 default_server;

listen [::]:80 default_server ipv6only=on;

root /usr/share/nginx/www;

server_name vmhost;

location/{

try_files $uri $uri/ /index.htm /index.html =404;

}

error_page 404 /404.html;

location ~ \.php$ {

fastcgi_pass unix:/var/run/php5-fpm.sock;

fastcgi_index index.php;

include fastcgi_params;

}

location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {

return 403;

error_page 403 /403_error.html;

}

location ~ /\.ht {

deny all;

}

}

的的/ etc/nginx的/网站可用/ testsitea文件:

server {

listen 80;

listen [::]:80;

server_name mytest;

root /usr/share/nginx/www/testfolder/public;

location/{

try_files $uri $uri/ /index.html;

}

}

的符号链接:

[email protected]:/etc# ls -l /etc/nginx/sites-enabled

total 0

lrwxrwxrwx 1 root root 34 Mar 17 13:47 default -> /etc/nginx/sites-available/default

lrwxrwxrwx 1 root root 36 Mar 25 14:30 testsitea -> /etc/nginx/sites-available/testsitea

当我把我的浏览器http://192.168.1.45/,我看到预期的“欢迎nginx的!” 如果我将浏览器地址设置为http://192.168.1.45/vmhost,我还会看到“Welcome to nginx!”

当我指导我的浏览器到http://192.168.1.45/mytest我期望看到的是我的测试网站的静态index.html文件。我实际看到的是“欢迎使用nginx!”文件。

error.log文件只显示“信号进程开始”。我已验证文件夹权限设置为755,文件权限为644.

您能看到我的错误在哪里吗?

2014-03-25

CMB

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值