Default nginx page

my domain shows default nginx “working on it” page. my ip shows index.htm page like it’s supposed to.
https://intodns.com/ & https://dnschecker.org/ look like the domain/dns settings check out.
Ran “rm -rv” /var/cache/nginx/*temp to clear old files. “systemctl restart nginx”.
Using CookieAutoDelete + FF Private windows for clearing cache et. al. & visiting the website.

I do believe the security cert from the URL is the one generated by HCP.

What other info do you guys need? Why doesn’t the index.htm page appear when visiting the URL? As far as I know, all nginx conf files should point to the same root and index location. Maybe I’m missing something?

first things firt: please do not post your domain or IP publicly. it might make you an easy target for random attacks. I edited your post for that. if we think it’d be helpful to know we will ask you to send it via DM.

for the issue at hand: you created a web domain, but where did you put your files for that domain?

As far as I know, all nginx conf files should point to the same root and index location

I am not sure if I understand you correctly, but probably you got this wrong. if you create a web domain, the public docroot for that will be /home/<user>/web/<domain>/public_html , so obviously your content needs to go there. evtl. you want to delete the placeholder index.html there as well.

the raw IP will not point there but instead go to /var/ww/html or the likes, as that’s just a placeholder. the IP itself cannot be pointing to multiple different domains home folders obviously and is not intended to be used at all for accessing sites.

It’s the IP of the server. The web browser shows it whenever people visit the site or a multitude of other ways. :man_shrugging:
Wait what? It’s a social network. As soon as I get my things together, that URL will hopefully be everywhere. You mean under attack because people will see that I don’t know everything and have asked for help? :thinking:

The static site files, index.htm(l) etc, are in /var/www/html. Just copied them all to the non-root HCP user dir. It worked! :star_struck:

Give yourself a big hug for me. Thank you!
I never thought about this as /etc/nginx/nginx.conf → /etc/nginx/conf.d/domains/thefreaksclub.conf pointed to the files in /var/www/html/ and I assumed that’d be the main one.

So, if someone for whatever reason wants to visit the site via IP, should I just symlink everything from the HCP user dir to /var/www/html/ ?
It just feels odd to me that visiting the URL isn’t the same as going to the IP address directly. How should I handle this?

1 Like

I think you should not nurture the use of an IP for accessing your site at all. it is the wrong way to do.
as soon as you have two domains or different pages under that IP, how would you want to decide which one should appear under the IP? the times where one IP could only be used with one domain and page are long gone :wink:

I understand that, if you run a very single domain/page on your server, one might think about what’s happening if someone types the IP address. and, while no one is going to do so in the first place, I think they should end up on a neutral page if at all and never on one of your websites.
you can’t use pure IPs with ssl properly and without browser warnings. also urls with IP instead of domain might even hurt SEO for your main page if ever bots stumble across it and so on.

leave the IP be just a placeholder and do not even promote it, but instead only ever link everything with your domain. imagine what happens if people bookmark your page by IP and then you switch servers…

if you really lose sleep over it, I’d then put an .htaccess 302 redirect into /var/www/html that points to your real domain.

1 Like

Yeah, I agree. I think I just got used to typing it for SSH. :laughing:

Good idea. Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.