VPS侦探论坛

 找回密码
 注册
查看: 10485|回复: 4

lnmp重启后网站无法打开

[复制链接]
发表于 2010-8-3 06:57:20 | 显示全部楼层 |阅读模式

FTP可以连接,但网站就是无法打开,帮忙看看什么原因?

下面是restart的过程
# /root/lnmp restart
  1. =========================================================================
  2. Manager for LNMP V0.4  ,  Written by Licess
  3. =========================================================================
  4. LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
  5. This script is a tool to Manage status of lnmp
  6. For more information please visit http://www.lnmp.org

  7. Usage: /root/lnmp {start|stop|reload|restart|kill|status}
  8. =========================================================================
  9. Reload LNMP...
  10. Reload Nginx configure...
  11. [emerg]: unexpected end of file, expecting ";" or "}" in /usr/local/nginx/conf/nginx.conf:103
  12. configuration file /usr/local/nginx/conf/nginx.conf test failed
  13. cat: /usr/local/nginx/logs/nginx.pid: No such file or directory
  14. kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
  15. Nginx program is reloding!
  16. Shutting down MySQL. SUCCESS!
  17. Starting MySQL. SUCCESS!
  18. Shutting down php_fpm  done
  19. Starting php_fpm  done
复制代码


vi  /usr/local/nginx/conf/nginx.conf
  1. server
  2.         {
  3.                 listen       80;
  4.                 server_name ikaoti.com;
  5.                 index index.html index.htm index.php;
  6.                 root  /home/wwwroot;

  7.                 location ~ .*\.(php|php5)?$
  8.                         {
  9.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  10.                                 fastcgi_index index.php;
  11.                                 include fcgi.conf;
  12.                         }

  13.                 location /status {
  14.                         stub_status on;
  15.                         access_log   off;
  16.                 }

  17.                 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  18.                         {
  19.                                 expires      30d;
  20.                         }

  21.                 location ~ .*\.(js|css)?$
  22.                         {
  23.                                 expires      12h;
  24.                         }

  25.                 log_format  access  '$remote_addr - $remote_user [$time_local] "$request";













  26.                 access_log off ;

  27. }
  28. include vhost/*.conf;
  29. }
复制代码
提示nginx.conf有错,但我看不出啥错,麻烦兄弟们帮一下忙
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-8-3 09:13:47 | 显示全部楼层

回复 1# 的帖子



log_format 一行有错误。
直接删除
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2010-8-3 13:08:14 | 显示全部楼层

原帖由 licess 于 2010-8-3 09:13 发表
log_format 一行有错误。
直接删除


删掉这一行还是不行,怎么办呢?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-8-3 13:38:15 | 显示全部楼层



提示那一行有错误就把这一行前后几行的配置都发上来。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2010-8-5 03:37:13 | 显示全部楼层

这是完整的配置文件,老大看看啊.
  1. user  www www;

  2. worker_processes 1;

  3. error_log  /home/wwwroot/logs/nginx_error.log  crit;

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

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

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

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

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

  20.                 sendfile on;
  21.                 tcp_nopush     on;

  22.                 keepalive_timeout 60;

  23.                 tcp_nodelay on;


  24.                 fastcgi_connect_timeout 600;
  25.                 fastcgi_send_timeout 600;
  26.                 fastcgi_read_timeout 600;
  27.                 fastcgi_buffer_size 128k;
  28.                 fastcgi_buffers 4 128k;
  29.                 fastcgi_busy_buffers_size 256k;
  30.                 fastcgi_temp_file_write_size 512k;

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

  38.                 #limit_zone  crawler  $binary_remote_addr  10m;

  39. server
  40.         {
  41.                 listen       80;
  42.                 server_name ikaoti.com;
  43.                 index index.html index.htm index.php;
  44.                 root  /home/wwwroot;

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

  51.                 location /status {
  52.                         stub_status on;
  53.                         access_log   off;
  54.                 }

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

  59.                 location ~ .*\.(js|css)?$
  60.                         {
  61.                                 expires      12h;
  62.                         }















  63.                 access_log off ;

  64. }
  65. include vhost/*.conf;
  66. }
复制代码

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-8 07:35 , Processed in 0.026518 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表