Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By Matt Porter
Hey everyone,
I’m new to Digital Ocean / VPS, and just moved from shared hosting. I’ve got a pretty decent handle over everything the last few days, but I have an odd issue I can’t solve now. I’m currently running a LEMP stack.
For whatever reason, my site.com/wordpress/wp-admin page always brings up a 404, which with my current setup redirects to site.com/oops. No other url has an issue, and I can even go to site.com/wordpress/wp-admin**.index**, but without the .index, it doesn’t work. The login by default doesn’t add index, so whenever I try to log in I get a 404.
My only guess as to what’s going on, is that I messed something up when putting Wordpress in its own directory. My setup is currently in var/www/site/public_html/wordpress/, and it’s on it’s own server block. On Shared hosting / apache, I simply had to add a bit of code to the .htaccess file, but I read with nginx I had to edit my server block within the sites-available directory. I then copied the index.php file from wordpress to the root, and added the header bit (as I’ve always done for this setup). Here’s what I found / added, is this correct?
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/anightinburlington.com/public_html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name anightinburlington.com www.anightinburlington.com;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
try_files $uri /wordpress$uri/ /wordpress/index.php?q=$uri&$args;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}