Html site show welcome to nginx page

I created a html site. sudo ee site create example.com --html

add an index.html page in webroot folder(/var/www/example.com/htdocs)

chown -R www-data:www-data /var/www/example.com/

ls -l /var/www/example.com/htdocs/index.html result: -rw-r–r-- 1 www-data www-data

always shows welcome to nginx page.

I delete html site and create wp site sudo ee site create example.com --wp

show wp homepage.

by the way, I browse www.example.com ,get index.html ,browse example.com get welcome to nginx page in a html site. I browse www.example.com or example.com get wp homepage page in a wp site.

HTML NGINX CONFIGURATION

  2 
  3 server {
  4 
  5     server_name example.com www.example.com;
  6 
  7     access_log   /var/log/nginx/ms.jm.access.log;
  8     error_log    /var/log/nginx/ms.jm.error.log;
  9 
 10     root /var/www/ms.jm/htdocs;
 11     index index.html index.htm;
 12 
 13     location / {
 14         try_files $uri $uri/ /index.html;
 15     }
 16 
 17     include common/locations.conf;
 18 
 19 }

I get it. run service nginx reload

Glad to know your issue is resolved :smile:

I have this exact problem also, followed all the steps here including NGINX reload (OK) but still my HTML page does not load I always see the NGINX welcome page.

I am trying to host a pre-built HTML landing page, all the files including index.html are in the “htdocs” folder. The config file is same as in this topic, really stuck with this!

Hi @jims45

It’s been a long time, and we haven’t heard from you. It looks like your issue is resolved, if not please provide your NGINX vhost configuration.

I am closing this support topic for now. If you are still facing issues, feel free to create a new support topic. :slight_smile: