我的网站甚至无法在网站中添加构建路径(默认可用)

时间:2019-09-08 05:38:34

标签: nginx

我已在AWS Ngnix上添加了我的网站。 我已经构建了一个应用程序,并在/ etc / ngnix / sites-available / default中添加了该路径 但访问IP地址后,提示未找到404。

我构建了一个应用,并在可用/默认的网站中提供了该路径

以下是我的网站的代码-可用/默认

GNU nano 2.9.3                                                                        /etc/nginx/sites-available/default                                                                                  

        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;

#       root /var/www/html;
        root /var/www/sample/dist/sample;
        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri /index.html index.php;
        }

        # pass PHP scripts to FastCGI server
        #
        #location ~ \.php$ {
        #       include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        #       fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        #       # With php-cgi (or other tcp sockets):
        #       fastcgi_pass 127.0.0.1:9000;
        #}

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

0 个答案:

没有答案