【发布时间】:2016-01-04 12:59:34
【问题描述】:
背景:我已经安装并正在维护一个以 nginx 作为 Web 服务器的 OTRS v4.0 系统。系统一直在运行,直到我在 nginx.conf 中添加了 ssl 端口,从那时起,我试图连接到网页
但没有响应并显示 nginx 错误!找不到您要查找的页面。
我从 nginx.conf 文件中删除了 ssl 部分,但我仍然无法恢复我之前的网页状态。
- 在 error.log 文件中显示找不到 index.pl 文件 open() "/usr/share/nginx/html/otrs/index.pl" failed (2: No这样的文件或目录) 每当我点击 URL (http://localhost/otrs/index.pl) 时都会记录此消息。
- 在 otrs.log 文件中,它只记录 PID。
有什么办法可以不用重新安装otrs吗?或我错过检查的任何其他日志文件
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
#debug_connection 10.0.2.15;
}
http {
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;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 80 default_server;
#listen 80;
server_name server.unixmen.local;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}
?
提前致谢!
【问题讨论】:
-
这看起来很像一个默认的 nginx 配置文件,您需要查看
/etc/nginx/conf.d以查看其中的内容,因为此文件中没有配置otrs的内容。另外 - 这可能与 Stack Overflow 无关。 -
嗨。目录 /etc/nginx/conf.d 是空的! @Sobrique
-
嗯,这就是它不工作的原因。因为nginx里面什么都没有配置。
-
嗨,我不明白 nginx 服务在机器上处于活动状态并启用。我需要重新安装nginx吗? @Sobrique
-
你在那里有一个基本的 nginx 安装。通常在
conf.d中添加可选的额外内容。如果没有,你有一个“香草”配置,没有与任何东西集成。这就是它不起作用的原因。