所以我使用的是数字海洋Server和我起诉LEMP构建。的Nginx服务器问题
,当我浏览到/ var/www/html等目录中,我看到附带构建的两个标准文件“的index.html”和“的index.php”。
现在我的问题是,我的Web应用程序是这样的“的index.html”文件位于下另一个子目录“DIST”结构。 (在/ var/www/html等/距离/)
如何配置Nginx的显示这个文件?
更新:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
servername ***.**.**.**;
location/{
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
你能告诉我们这个Web应用程序的nginx的配置? –
我在哪里可以找到这个文件?对不起nginx很新... –
没问题,没关系。可能在/ etc/nginx/sites-enabled /中有一个文件。它通常有'.conf'扩展名,但并不总是,如果你打开该文件夹中的文件,你可以找到一个内容如'server_name yourdomain.com',给我们发送 –