I’ve been moving my portfolio site over to a Digital Ocean server and just when I think I have everything squared away all my subpages start turning up 404s. I’d seen the forum posts about this and have tried just about everything on here.
For reference:
I have mbstring installed
I have multiviews enabled in the Apache conf file
I have c::set(‘ssl’, true); set in the Kirby config file
Also c::set(‘url’, ‘http://example.com’);
I’ve tried having RewriteBase both on and off
Changing the file permissions as described by several posts
Oddly this issue seemed to start up after I installed Let’s Encrypt certs for the site…maybe that can be a helpful clue for someone who knows what’s up? Particularly frustrating since I didn’t have this problem with essentially the same set up with a different site previously.
If anyone has any ideas that would be immensely appreciated!
Is it Apache or Nginx? What did you pick when you bought the hosting in Digital Ocean?
As for .htaccess question, you should have the one thats in the starterkit zip file up there. Its hidden so unhide files on your machine. From they way your talking, sound like you have a blank .htaccess other then the SSL rules.
I know you mention Apache configs, but some hosting allows you to use Apache files and it translates the file to Nginx.
# Kirby .htaccess
# rewrite rules
<IfModule mod_rewrite.c>
# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on
# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite
# In some enviroments it's necessary to
# set the RewriteBase to:
#
RewriteBase /
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
# block all files in the site folder from being accessed directly
# except for requests to plugin assets files
#RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
#RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
RewriteRule ^site/(.*) index.php [L]
# block direct access to kirby and the panel sources
RewriteRule ^(kirby|panel\/app|panel\/tests)/(.*) index.php [L]
# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on
I followed this guide for installing the SSL so I didn’t realize there was another conf file in the folder all of a sudden titled “jakebf.com-le-ssl.conf”, now that I’m looking at it for the first time I’m guessing the settings should probably be set to match the other other conf file. Here it is:
Yeah, that’s just not correct. Seems I just missed configuring that file entirely so just I went back in and set that to match (and match the other config file) and restarted the server and now everything is working beautifully!