我知道这个问题已经问过很多次了。我检查了答案,但没有一个对我有用。我运行这个命令
which nginx
我得到了/usr/sbin/nginx
我试着导航到那个文件夹,我可以看到nginx文件夹,但是上面写着Not a directory
我导航到/etc/nginx/sites-available,但无法访问default目录或我想要的域目录,它一直在说同样的话,我无法访问它们来进行任何编辑。这是我第一次在nginx服务器上工作,所以这里需要帮助。
nginx: [warn] conflicting server name "lolnews.com.br" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "lolnews.com.br" on 0.0.0.0:80, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is success
我有下面的Dockerfile来启动nginx服务器:
# Set the base image to Ubuntu
FROM ubuntu
# File Author / Maintainer
MAINTAINER myname "myemail@gemail.com"
# Install Nginx
# Add application repository URL to the default sources
# RUN echo "deb http://archive.ubuntu.com/ubuntu/ raring main universe"
nginx不会在启动时启动,但是手动启动很好。日志上写着
nginx: [emerg] host not found in upstream "{some hostname}" in /etc/nginx/conf.d/some_site.conf
nginx: configuration file /etc/nginx/nginx.conf test failed
Failed to start A high performance web server and a reverse proxy server.
nginx.service: Unit entered fail
我刚刚安装了一个CentOS 6.5服务器,并安装在它的nginx上。
我已经禁用了SELINUX并重新启动了服务器,但是除了主机本身之外,其他服务器仍然无法访问nginx。
这是我的nginx配置:
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;