Question

How can I access Wordpress on my Ubuntu server (wordpress image preloaded) after installing ssl with Let's Encrypt and Apache tutorials?

Posted June 10, 2017 3k views
Apache WordPress Let's Encrypt Ubuntu 16.04

I just went through the tutorial process with[ this tutorial]https://www.digitalocean.com/community/tutorials/how-to-set-up-let-s-encrypt-certificates-for-multiple-apache-virtual-hosts-on-ubuntu-16-04) to set up an ssl certificate and this tutorial (claimed as a prerequisite for the first). The ssl certificate is working, but I can no longer access my wordpress panel or the site that I’ve been building through my domain. It’s just going to this very limited html file (www.mindingmypeas.com)

When I try to access the wordpress admin panel (mindingmypeas.com/wp-admin) it gives me this error message:

**Not Found

The requested URL /wp-admin/ was not found on this server.

Apache/2.4.18 (Ubuntu) Server at www.mindingmypeas.com Port 443**

This is my very first time setting up anything like this, so it is entirely possible that I just massively screwed it up. I’ve been looking through the tutorials and don’t see any addressing anything remotely like this. Thanks for any help!

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.

4 answers

Hi @violinchic92

Your DocumentRoot in your Apache configuration of the HTTPS VirtualHost, is probably pointing to a different location than the HTTP VirtualHost was.

Can you post your Apache configuration? It’s located in /etc/apache2/sites-enabled/.

*<VirtualHost *:80>
ServerAdmin mindingmypeas@gmail.com
ServerName mindingmypeas.com
ServerAlias www.mindingmypeas.com
DocumentRoot /var/www/mindingmypeas.com/public_html

    <Directory /var/www/html/>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on
RewriteCond %{SERVERNAME} =mindingmypeas.com [OR]
RewriteCond %{SERVER
NAME} =www.mindingmypeas.com
RewriteRule ^ https://%{SERVERNAME}%{REQUESTURI} [END,NE,R=permanent]
</VirtualHost>
Include /etc/phpmyadmin/apache.conf*

Is this what you’re talking about @hansen?

@hansen okay, I found that part.

*<VirtualHost *:443>
ServerAdmin mindingmypeas@gmail.com
ServerName mindingmypeas.com
ServerAlias www.mindingmypeas.com
DocumentRoot /var/www/mindingmypeas.com/public_html

    <Directory /var/www/html/>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLCertificateFile /etc/letsencrypt/live/mindingmypeas.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mindingmypeas.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
elizabeth@wordpress-1gb-mindingpeas:/etc/apache2/sites-enabled$*

  • @violinchic92

    Okay, either you changed the DocumentRoot for both configurations or you’ve installed WordPress into a different location.
    My guess is that you need to change DocumentRoot to this and restart Apache:

    DocumentRoot /var/www/html
    

@hansen That worked! Thank you so much!

Submit an Answer