admin管理员组文章数量:1425891
I'm coding a theme from an HTML template. Initially, I just removed the index.php with the .htaccess as the answer shows.
Now I have "Internal Server Error" even on the homepage, that was working before that.
I already tried to change my permalinks a thousand times. Don't know what to do anymore.
I'm using the latest WP version, 5.2.2 I guess. I'm locked out of the dashboard. but I have wp-cli if it could help.
Thanks for any help!
This is my apache2.conf
<Directory />
Options FollowSymLinks
AllowOverride All
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
My .htaccess in /var/www/html/site2.localhost/public_html/
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
I'm coding a theme from an HTML template. Initially, I just removed the index.php with the .htaccess as the answer shows.
Now I have "Internal Server Error" even on the homepage, that was working before that.
I already tried to change my permalinks a thousand times. Don't know what to do anymore.
I'm using the latest WP version, 5.2.2 I guess. I'm locked out of the dashboard. but I have wp-cli if it could help.
Thanks for any help!
This is my apache2.conf
<Directory />
Options FollowSymLinks
AllowOverride All
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
My .htaccess in /var/www/html/site2.localhost/public_html/
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
1 Answer
Reset to default 0I just found the answer.
Firstly, I look out for an apache error log in /var/log/apache2
, on the file error.log.1 I found these last lines:
[Sun May 26 22:46:23.694952 2019] [core:alert] [pid 8436] [client ::1:52840] /var/www/html/site2.localhost/public_html/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://site2.localhost/wp-admin/edit.php?post_type=page
[Mon May 27 00:08:19.614216 2019] [mpm_prefork:notice] [pid 8418] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Searching for "Invalid command 'RewriteEngine'", I found this thread that has an answer to the question:
Look for the file rewrite.load on /etc/apache2/mods-enabled
, if you didn't find the file, run sudo a2enmod rewrite
and after restart apache with sudo service apache2 restart
.
Now the file rewrite.load appears on the /etc/apache2/mods-enabled
directory and I just refresh the browser to everything back to normal.
本文标签: apacheRemoved indexphp now all pages with Internal Server Error
版权声明:本文标题:apache - Removed index.php now all pages with Internal Server Error 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745458805a2659228.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论