Max de Kroon
Max de Kroon

Reputation: 21

XAMPP + Wordpress: 500 Internal Server Error

I am currently trying to set up a XAMPP web server running a Wordpress website using this tutorial: https://code.tutsplus.com/articles/how-to-setup-a-wordpress-development-environment-for-windows--wp-23365

After everything went perfect, upon completing the final step, the core HTML of my wordpress template loads, but all stylesheets and posts cannot be opened. Upon loading the index.php through localhost, I get the following:

screenshot of the page

After some searching, I checked the Apache error logs and found the following:

[Sun Mar 11 00:49:27.099600 2018] [ssl:warn] [pid 9888:tid 552] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 11 00:49:27.145220 2018] [core:warn] [pid 9888:tid 552] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun Mar 11 00:49:27.150665 2018] [ssl:warn] [pid 9888:tid 552] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 11 00:49:27.178739 2018] [mpm_winnt:notice] [pid 9888:tid 552] AH00455: Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.2 configured -- resuming normal operations
[Sun Mar 11 00:49:27.178739 2018] [mpm_winnt:notice] [pid 9888:tid 552] AH00456: Apache Lounge VC15 Server built: Nov  3 2017 10:30:36
[Sun Mar 11 00:49:27.178739 2018] [core:notice] [pid 9888:tid 552] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sun Mar 11 00:49:27.199797 2018] [mpm_winnt:notice] [pid 9888:tid 552] AH00418: Parent: Created child process 20752 AH00548: NameVirtualHost has no effect and will be removed in the next release C:/xampp/apache/conf/extra/httpd-vhosts.conf:2
[Sun Mar 11 00:49:27.783347 2018] [ssl:warn] [pid 20752:tid 620] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 11 00:49:27.829470 2018] [ssl:warn] [pid 20752:tid 620] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 11 00:49:27.856542 2018] [mpm_winnt:notice] [pid 20752:tid 620] AH00354: Child: Starting 150 worker threads.
[Sun Mar 11 00:49:36.078032 2018] [core:error] [pid 20752:tid 1828] [client 127.0.0.1:62660] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://127.0.0.1/wp-vs-494/wp-admin/
[Sun Mar 11 00:49:36.078534 2018] [core:error] [pid 20752:tid 1828] [client 127.0.0.1:62660] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://127.0.0.1/wp-vs-494/wp-admin/

Note the last two lines state that the limit of 10 internal redirects is exceeded, probably due to a configuration error. This same message continues to be repeated a number of types afterwards.

Unfortunately, I have no experience whatsoever with setting up a local web server, so I do not know what to do. I have looked at multiple stackoverflow suggestions and gone through all files, but I am lost. Has anyone else experienced this or does someone have an idea of what I can do? Cheers in advance

EDIT: after some more searching, I found that people are mostly modifying their .htaccess files, here is mine:

# BEGIN WordPress
<IfModule mod_rewrite.c>    
RewriteEngine On    
RewriteBase /wp_vs_494/ 
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp_vs_494/index.php [L]
</IfModule>
# END WordPress

Additionally, here is my directory structure of the C:/xampp/htdocs/ folder:

C:/xampp/htdocs/ structure

Upvotes: 1

Views: 4189

Answers (2)

Matt
Matt

Reputation: 33

Late reply I know but for anyone going through and cursing apache: As PPL suggested check your permalinks in Wordpress > Settings. Change them to plain and save. Then change them back to the style you want.

After 3 days of self-hatred, the issue is resolved!

Upvotes: 0

Max de Kroon
Max de Kroon

Reputation: 21

Upon further investigation, I found an .htaccess file configuration which fixed the issue. The second line of code "RewriteBase /" fixed it.

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

However, now I am running into a new problem, namely that when I try to login using the /wp-admin url extension, and fill in my credentials, I get redirected to the same page.

Upvotes: 1

Related Questions