I’d check a few things
Apache2 logs
- open a terminal
- Check error logs at
tail -f /var/log/apache2/error_log
- Check access logs at
tail -f /var/log/apache2/access_log
WordPress
- Check .htaccess has correct rules for basic setup
- enable wp debugging to see if you can log further errors when the redirect happens
this is how you enable WP logging
- Add in
wp-config.php
before the/* That's all, stop editing! Happy blogging. */
these 3 lines of code
This will create a debug.log file in wp-content
folder
define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Then try to access your url and check your logs for any information while you get your 404 error.
Check these things and report back if you find something odd. Your setup seems fine to me as is. But you might be missing something else. That’s why checking your logs should provide more info if you have a miss configuration.
EDIT
I believe your problem is with the DirectoryIndex directive
Cannot serve directory /Library/Server/Web/Data/Sites/www.ecumene.com/: No matching DirectoryIndex (index.html,index.php,default.html) found, and server-generated directory index forbidden by Options directive
WordPress is using the index.php
file behind the scene to convert permalinks into query vars. But currently your web server is not set to read index.php
files (most likely it will only allow index.html
files) so you will need to add this file to your DirectoryIndex
directive
locate your httpd.conf
(likely in /private/etc/apache2/httpd.conf
)
then
sudo nano /private/etc/apache2/httpd.conf
- Search the file ( ctrl + w ) for
DirectoryIndex
and add index.php
to this block
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
- Exit nano using ctrl + x and answering
y
to save the modified file - Test your config
sudo apachectl -t
- Restart apache
sudo apachectl restart
This will tell apache to look in your site directory for index.php
files first, if none found, it will try for index.html
files.
This should fix your issue.