VPS configuration, deploying website with nginx

Issues related to configuring your network
Post Reply
Posts: 1
Joined: 2019/11/30 21:07:42

VPS configuration, deploying website with nginx

Post by thekardynal » 2019/11/30 21:21:00

Hey all, new forum user here and I just got a small VPS to learn more about system administration, centos(8 is installed) and deploying.

So far these last few days I've been installing everything as it came completely empty and with not much packages installed(git, node, npm, docker, et cetera) and I created a user that is now part of the wheel group, disabled ssh root login, changed the ssh port and worked a little bit with the firewall, installed the LEMP stack etc.

Now I want to see if I can deploy a simple site that I cloned from my GitHub profile.
Info a: I want to use nginx
b: I've already bought a domain name and changed the nameservers to the ones that were given to me from my vps host.
c: going the IP-Address of the vps shows me the nginx landing page(server is working)

The question: how do I use my already online domain name to deploy a simple website? Do I just change server_name inside the nginx.conf?! I already tried that and it doesn't work.

Here's what that file looks like(simplified):

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;

Thanks in advance

Posts: 3045
Joined: 2014/09/20 11:22:14

Re: VPS configuration, deploying website with nginx

Post by aks » 2019/12/01 17:25:11

Check SELinux is not tripping you up (run in Permissive mode for example).
Check that nginx is running and listening on TCP/80
Otherwise it's your code and/or /usr/share/nginx/html/<filename_usually_index.html> is not there (or can not be read).

Post Reply

Return to “CentOS 8 - Networking Support”