Hello,
I followed every steps from tutorial https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04#step-3-–-checking-your-web-server
I added dns to my domain provider,
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!
I have the same issue my domain reply but not open the web page , my setup is nginx and mariadb and wordpress any help please
Hi @choipaper,
There are a couple of things you’ll need to check. Make sure you have created a configuration file for your domain mydomain.com in the /etc/nginx/sites-available/mydomain.com.
In there make sure you have the proper server block like so
server {
listen 80;
listen [::]:80;
root /var/www/mydomain.com/html;
index index.html index.htm index.nginx-debian.html;
server_name mydomain.com www.mydomain.com;
location / {
try_files $uri $uri/ =404;
}
}
Notice that you’ll need to change
root /var/www/mydomain.com/html;
and
server_name mydomain.com www.mydomain.com;
To the proper path and domain respectfully.
Once you have updated your configuration file, make sure to run
sudo ln -s /etc/nginx/sites-available/mydomain.com /etc/nginx/sites-enabled/
Again, remember to change your mydomain.com with the actual domain.
Lastly, check your Nginx configuration with
sudo nginx -t
If everything is okay restart nginx and everything should start working
service nginx restart
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.