I deployed my wordpress site in Google Cloud Compute Engine. To enable SSL I followed the the steps outlined here https://www.onepagezen.com/free-ssl-certificate-wordpress-google-cloud-click-to-deploy
- Install Certbot Client
- Generate Certificates
- Configure the Certificates
- Enable HTTPS Redirect
- Restart Apache Server
- Update WordPress URLs
- Configure SSL Auto-Renewal
Edit /etc/apache2/sites-available/default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
...
and /etc/apache2/sites-available/wordpress.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName mydomain.com
ServerAlias mydomain.com
Redirect permanent / https..mydomain.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
After setting everything up, I run:
sudo a2ensite default-ssl
sudo a2enmod ssl
sudo service apache2 restart
SSL works fine for the backend and the landing page. However for all other pages I get a 404. When I switch form custom permalinks to simple permalinks the pages are accessible again. Any ideas what might be causing the problem?
Redirect permanent / https..mydomain.com
actually how it is or is this shorthand intended to communicate that all requests are port 80 should be redirected to 443?