Question

error loading wordpress

I just installed wordpress on my LEMP server. When I attempted to access it to set it up via Firefox browser it came back with the the following popup:

You have chosen to open:
which is: application/octet-stream (420 bytes) from https://mydomain.com

Before installing wordpress I set up a test site with all of the components of the LEMP server. I had configured my firewall for https and had acquired my SSL certificates. This site worked perfectly.

Given that my test site worked properly, the problem has to be in the wordpress installation. To install wordpress, I followed the instructions in the tutorial “How to Install WordPress with LEMP on Ubuntu 18.04” to the letter.

Does anyone have an idea what went wrong and how to fix it?


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.

Accepted Answer

Hello,

I believe that something is not correct with the Wordpress Nginx server block, would you mind sharing the Nginx configuration file here so that I could have a look and advice you further?

Regards, Bobby

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

[Example link](file:///etc/nginx/sites-available/wrkblock) Never tried using this link before so I’m not sure it will work. As a backup, I’ll simply copy the file contents below. Please let me know if the file got attached.

server {

listen 443 ssl; # managed by Certbot
listen [::]:443 ssl ipv6only=on; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/musingsofamaverick.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/musingsofamaverick.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

root /var/www/wordpress;
index index.html index.htm index.php;

server_name musingsofamaverick.org www.musingsofamaverick.org;

location / {
    try_files $uri $uri/ /index.php$is_args$args;
}

location ~ \.php$ {
	include snippets/fastcgi-php.conf;
}

location = /favicon.ico { 
    log_not_found off; access_log off; 
}

location = /robots.txt { 
    log_not_found off; 
    access_log off; allow all; 
}

location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
    expires max;
    log_not_found off;
}

}

server { if ($host = www.musingsofamaverick.org) { return 301 https://$host$request_uri; } # managed by Certbot

if ($host = musingsofamaverick.org) {
   return 301 https://$host$request_uri;
} # managed by Certbot


listen 80 default_server;
listen [::]:80 default_server;

server_name musingsofamaverick.org www.musingsofamaverick.org;
return 404; # managed by Certbot

}