Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
重新安装nginx后无法进入nginx欢迎页面_Nginx_Rackspace Cloud - Fatal编程技术网

重新安装nginx后无法进入nginx欢迎页面

重新安装nginx后无法进入nginx欢迎页面,nginx,rackspace-cloud,Nginx,Rackspace Cloud,当我第一次安装nginx时,我能够使用服务器的ip(rackspace云服务器)访问“欢迎使用nginx”索引页面。长话短说,我不得不重新安装nginx,但在重新安装nginx之后,我再也无法访问nginx欢迎页面 我已经多次停止和启动了nginx,并重新启动了服务器,但都不起作用。 “站点可用”中的默认文件不应该在每个instal上都相同吗 以下是来自可用站点的默认文件的内容: # You may add here your # server { # ... # } # statement

当我第一次安装nginx时,我能够使用服务器的ip(rackspace云服务器)访问“欢迎使用nginx”索引页面。长话短说,我不得不重新安装nginx,但在重新安装nginx之后,我再也无法访问nginx欢迎页面

我已经多次停止和启动了nginx,并重新启动了服务器,但都不起作用。 “站点可用”中的默认文件不应该在每个instal上都相同吗

以下是来自可用站点的默认文件的内容:

# You may add here your
# server {
#   ...
# }
# statements for each of your virtual hosts to this file

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

server {
    #listen   80; ## listen for ipv4; this line is default and implied
    #listen   [::]:80 default ipv6only=on; ## listen for ipv6

    root /usr/share/nginx/www;
    index index.html index.htm;

    # Make site accessible from http://localhost/
    server_name localhost;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to index.html
        try_files $uri $uri/ /index.html;
        # Uncomment to enable naxsi on this location
        # include /etc/nginx/naxsi.rules
    }

    location /doc/ {
        alias /usr/share/doc/;
        autoindex on;
        allow 127.0.0.1;
        deny all;
    }

    # Only for nginx-naxsi : process denied requests
    #location /RequestDenied {
        # For example, return an error code
        #return 418;
    #}

    #error_page 404 /404.html;

    # redirect server error pages to the static page /50x.html
    #
    #error_page 500 502 503 504 /50x.html;
    #location = /50x.html {
    #   root /usr/share/nginx/www;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #   fastcgi_split_path_info ^(.+\.php)(/.+)$;
    #   # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
    #
    #   # With php5-cgi alone:
    #   fastcgi_pass 127.0.0.1:9000;
    #   # With php5-fpm:
    #   fastcgi_pass unix:/var/run/php5-fpm.sock;
    #   fastcgi_index index.php;
    #   include fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #   deny all;
    #}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#   listen 8000;
#   listen somename:8080;
#   server_name somename alias another.alias;
#   root html;
#   index index.html index.htm;
#
#   location / {
#       try_files $uri $uri/ /index.html;
#   }
#}


# HTTPS server
#
#server {
#   listen 443;
#   server_name localhost;
#
#   root html;
#   index index.html index.htm;
#
#   ssl on;
#   ssl_certificate cert.pem;
#   ssl_certificate_key cert.key;
#
#   ssl_session_timeout 5m;
#
#   ssl_protocols SSLv3 TLSv1;
#   ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
#   ssl_prefer_server_ciphers on;
#
#   location / {
#       try_files $uri $uri/ /index.html;
#   }
#}

您是否收到网络错误或nginx错误页面?您是否在服务器上启用了防火墙?此外,站点是否已符号链接到
站点已启用/
?否我看不到任何网络错误,并且除了取消安装和重新安装nginx之外,我没有对服务器进行任何其他更改。说到这一点,你必须原谅我的noob-ishnest,我做前端开发的时间最长,对服务器管理从来没有真正认真过。不幸的是,没人担心,每个人都从某个地方开始:-)我只是想缩小可能性。当你将浏览器指向你的站点时,你实际上看到了什么?这是无法从浏览器连接到服务器的屏幕(“哎呀!谷歌浏览器无法连接到”在Chrome中),我觉得有点傻。该网站没有符号链接(只是知道这意味着什么),一旦我这样做,它的功能正常。生活和学习。