I feel so dumb asking this

I am new to the whole NGINX server so please ignore my complete ignorance.

I use spinupwp with Digital Ocean because I wanted to test out some of our SEO clients on something that wasn’t apache. I have searched high and low, tried going in through Putty, tried going in through sftp, and the console.

I’ve logged in with the root user tried getting to the /etc/nginx/sites-available/ so I can get to it and nothing. It’s like it isn’t even there. So maybe I set something up wrong.

I need to insert the following in the server context of your configuration file so I can serve my images as webp can someone please just point me in the right direction or let me know if I am even close looking in the places I am looking. Ugh I feel like such a newb and that it’s right in front of me and I am just completely missing it.

location ~* "wp-content\/(uploads\/)(.*.(?:png|jpe?g))" {
  add_header Vary Accept;
  set $image_path $2;
  if (-f "/sites/") {
  if ($http_accept !~* "webp") {
  try_files /wp-content/smush-webp/$image_path.webp $uri =404;

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
December 10, 2020
Accepted Answer

Hey there @MekaPika,

What is the Linux distribution that you are using?

For example, if you are using Nginx, your Nginx server blocks would be in /etc/nginx/conf.d rather than the sites-enabled folder as with Ubuntu servers. Files that end with .conf in that directory will be loaded when Nginx is started.

Also, don’t be afraid to ask! We are a friendly community!

Regards, Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel