I created a droplet and deployed a nextjs project. The IP address displays the content as expected.
I then tried to connect it to a domain name. However, the domain name only displays “welcome to nginx…If you see this page, the nginx web server is successfully installed and working. Further configuration is required.”
The DNS records show that hostname have the value of digitaloccean.com.
Any tip or reference as of what am I’m doing wrong would be highly welcomed.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
On top of what has already been mentioned, I’ll share this article on How to set up Nginx virtual hosts. The article mentions an old version of Ubuntu but the process is relatively the same for Ubuntu 22.04
Additionally, you can use our NginxConfig tool to generate the desired config file for your site.
Hope that this helps!
You need to configure your Nginx to accept your domain name. Most probably, you are using the normal configuration.
If you want to use your domain to proxy requests to your nextJS project with Nginx follow these steps:
SSH into your droplet and create a new Nginx configuration file for your domain:
mydomain.comwith your actual domain name. Add the following configuration, adjusting the
To enable the new configuration, create a symbolic link to it in the
Again, you’ll need to change the domain to the domain you wish to use.
If you wish to use a standard Nginx configuration, repeat all the steps above but for the config file use this: