免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6104 | 回复: 3
打印 上一主题 下一主题

[网络管理] 大家帮我看下,这是我nginx的主配文件,我访问不了~·(已解决) [复制链接]

论坛徽章:
1
天秤座
日期:2014-11-05 16:54:55
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-12-06 18:29 |只看该作者 |倒序浏览
本帖最后由 redhatuser 于 2010-12-07 09:39 编辑

RT
我的服务器在江苏那边,我在北京这边通过远程搭建的 LNMP 但是我却没办法访问``  请问我可能的问题是在哪里?
  1. user  www www;

  2. worker_processes 8;

  3. error_log  /data1/logs/nginx_error.log  crit;

  4. pid        /usr/local/webserver/nginx/nginx.pid;

  5. #Specifies the value for maximum file descriptors that can be opened by this process.
  6. worker_rlimit_nofile 65535;

  7. events
  8. {
  9.   use epoll;
  10.   worker_connections 65535;
  11. }

  12. http
  13. {
  14.   include       mime.types;
  15.   default_type  application/octet-stream;

  16.   #charset  gb2312;

  17.   server_names_hash_bucket_size 128;
  18.   client_header_buffer_size 32k;
  19.   large_client_header_buffers 4 32k;
  20.   client_max_body_size 8m;

  21.   sendfile on;
  22.   tcp_nopush     on;

  23.   keepalive_timeout 60;

  24.   tcp_nodelay on;

  25.   fastcgi_connect_timeout 300;
  26.   fastcgi_send_timeout 300;
  27.   fastcgi_read_timeout 300;
  28.   fastcgi_buffer_size 64k;
  29.   fastcgi_buffers 4 64k;
  30.   fastcgi_busy_buffers_size 128k;
  31.   fastcgi_temp_file_write_size 128k;

  32.   gzip on;
  33.   gzip_min_length  1k;
  34.   gzip_buffers     4 16k;
  35.   gzip_http_version 1.0;
  36.   gzip_comp_level 2;
  37.   gzip_types       text/plain application/x-javascript text/css application/xml;
  38.   gzip_vary on;


  39. #limit_zone  crawler  $binary_remote_addr  10m;

  40.   server {
  41.     listen       xx.xx.xx.xx:80; (这里的xx是我外网的ip)
  42.     server_name  xx.xx.xx.xx; (外网的ip,由于暂时没有域名解析,所以只能通过ip访问)
  43.     index index.html index.htm index.php;
  44.     root /data0/htdocs/www;
  45.      #limit_conn   crawler  20;

  46.     location ~ .*\.(php|php5)?$
  47.     {
  48.       #fastcgi_pass  unix:/tmp/php-cgi.sock;
  49.       fastcgi_pass  127.0.0.1:9000;
  50.       fastcgi_index index.php;
  51.       include fcgi.conf;
  52.     }

  53.     location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  54.     {
  55.       expires      30d;
  56.     }

  57.     location ~ .*\.(js|css)?$
  58.     {
  59.       expires      1h;
  60.     }

  61.     log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
  62.               '$status $body_bytes_sent "$http_referer" '
  63.               '"$http_user_agent" $http_x_forwarded_for';
  64.     access_log  /data1/logs/access.log  access;
  65.   }
  66. }

复制代码
我在客户端这边 通过浏览器 http://5x.xx.xx.xx
这样访问总是提示未找到页面
我在服务器上面查看 nginx的access.log
里面出现好多链接比如: 58.123.42.171  后面是时间...   400 - - -
也有我自己这边的外网ip后面都是400,
在测试访问时候我把防火墙,selinux,iptables都暂时停掉了,
请大家帮忙看看到底是什么原因导致我无法访问这个服务器的?

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
2 [报告]
发表于 2010-12-06 20:37 |只看该作者
楼主不是已经发过一个帖子求助吗
你检查下/data0/htdocs/www目录的权限,逐级检查,看看nginx的用户的权限

论坛徽章:
0
3 [报告]
发表于 2010-12-06 21:53 |只看该作者
权限问题

论坛徽章:
1
天秤座
日期:2014-11-05 16:54:55
4 [报告]
发表于 2010-12-07 09:39 |只看该作者
问题已经解决,多谢大家的回帖```{:3_190:}
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP