所以我使用的是數字海洋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',給我們發送 –