当前位置:论坛首页 > Linux面板 > 求助

Nginx配置规则错误:

发表在 Linux面板2017-4-8 22:26 [复制链接] 4 9535

本帖最后由 pepsigold 于 2017-4-8 22:29 编辑

Nginx配置规则错误:
nginx: [emerg] open() "/www/server/nginx/conf/rewrite/trfhairport.com.conf" failed (2: No such file or directory) in /www/server/panel/vhost/nginx/trfhairport.com.conf:12
nginx: configuration file /www/server/nginx/conf/nginx.conf test failed

系统: CentOS 6.8 (Final) 宝塔Linux面板 3.6.0

安装软件安装位置配置状态
操作

nginx 1.10.3

[url=]启动[/url]

MySQL 5.5.54

[url=]重启[/url]

Pure-Ftpd 1.0.43

[url=]重启[/url] | [url=]停止[/url]

PHP版本:56





  1. user  www www;

  2. worker_processes auto;

  3. error_log  /www/wwwlogs/nginx_error.log  crit;

  4. pid        /www/server/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.         multi_accept on;
  12.     }

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

  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 50m;

  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 256k;
  32.                 fastcgi_intercept_errors on;

  33.         gzip on;
  34.         gzip_min_length  1k;
  35.         gzip_buffers     4 16k;
  36.         gzip_http_version 1.1;
  37.         gzip_comp_level 2;
  38.         gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
  39.         gzip_vary on;
  40.         gzip_proxied   expired no-cache no-store private auth;
  41.         gzip_disable   "MSIE [1-6]\.";

  42.         #limit_conn_zone $binary_remote_addr zone=perip:10m;

  43.         server_tokens off;
  44.         access_log off;

  45. server
  46.     {
  47.         listen 888;
  48.         server_name master.trfhairport.cn;
  49.         index index.html index.htm index.php;
  50.         root  /www/wwwroot/default;

  51.         #error_page   404   /404.html;
  52.         include enable-php.conf;

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

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

  61.         location ~ /\.
  62.         {
  63.             deny all;
  64.         }

  65.         access_log  /www/wwwlogs/access.log;
  66.     }
  67. include /www/server/panel/vhost/nginx/*.conf;
  68. }
复制代码


使用道具 举报 只看该作者 回复
发表于 2017-4-8 22:37:26 | 显示全部楼层
本帖最后由 pepsigold 于 2017-4-8 22:38 编辑

切换版本,重新安装,
卸载了安装还是这样~前面使用是好好的,今天访问网站出问题还后台就这样了
使用道具 举报 回复 支持 反对
发表于 2017-4-8 23:18:16 | 显示全部楼层
你如果配置了多个站点做反向代理就会有这样的情况,我今天添加多个反向代理就不行了,一直提示错误
使用道具 举报 回复 支持 反对
发表于 2017-4-8 23:44:51 | 显示全部楼层
xdlhg888 发表于 2017-4-8 23:18
你如果配置了多个站点做反向代理就会有这样的情况,我今天添加多个反向代理就不行了,一直提示错误 ...

我没有添加反向代理啊~
使用道具 举报 回复 支持 反对
发表于 2017-4-9 00:05:41 | 显示全部楼层
中间全部网站在/www/server/nginx/conf/rewrite/目下
都没有网站地址.conf 的伪静态规则,
然后www设置为775就解决!
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

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