Simply-Static / simply-static

Convert your WordPress site into a static one with the free WordPress static site generator plugin, Simply Static.
https://simplystatic.com
GNU General Public License v2.0
188 stars 48 forks source link

Apache2 server crashing when loading Simply Static #202

Closed Phlogs closed 7 months ago

Phlogs commented 7 months ago

Hello! I'm having an issue using Simply Static on Wordpress 6.4.2.

My setup is an Apache2 server that I built on a VM Ubuntu Server following this tutorial : https://ubuntu.com/tutorials/install-and-configure-wordpress#1-overview

The installation of the plugin seems to work without issues, and the activation too. But when I try to load the page to use the plugin (clicking on "Simply Static" from the dashboard's menu on the left) it loads a blank page, and whatever I do next Apache server goes down with a "500 Internal Server Error".

Looking at the Apache error log, I found out the path to this file : '/srv/www/wordpress/.htaccess' Here is the content of the file :

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# BEGIN Simply Static
# The directives (lines) between "BEGIN Simply Static" and "END Simply Static" >
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<Files "/srv/www/wordpress/wp-content/uploads/simply-static//8ca3658c265d917752>
require all denied
require host localhost
</Files>
# END Simply Static

I found out that everything works again if I comment out these two lines :

require all denied
require host localhost

But then whenever I try to use Simply Static again, the same issue appears. What can I do? Thank you for your help!

patrickposner commented 7 months ago

Hey @Phlogs,

I just pushed a fix for that now.

If you download the latest master from GitHub and replace the files (make sure to keep the /vendor/ directory), it should work fine.

Phlogs commented 7 months ago

It works! Thank you very much!