0

I am a newbie and have almost setup a website locally with MAMP on Windows 10. Could someone please help me find the error? The rewrite log shows something might be wrong with my .htaccess and httpd-vhosts, but I can't seem to get them to behave.

I'm running PHP 7.4.1 in MAMP 4.2 (not pro). When I go to localhost in my browser with Apache and MySQL servers on, it shows the white screen of death. I get no errors in the access log or the error log. I've disabled plugins by renaming the plugin directory.

.htaccess located in vhosts document root C:/MAMP/htdocs/example1-folder/: (default WordPress)

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

drivers\etc\hosts:

127.0.0.1     example1.org
::1           example1.org

httpd.conf:

ServerName example1.org
DocumentRoot "C:/MAMP/htdocs"

<Directory />   # "default" configuration unchanged
    Options FollowSymLinks ExecCGI
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

<Directory "C:/MAMP/htdocs">  # This is the only line I changed
    Options Indexes FollowSymLinks ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

httpd-vhosts.conf:

NameVirtualHost *:80

<VirtualHost *:80> 
    ServerName example1.org
    DocumentRoot "C:/MAMP/htdocs/example1-folder/main"
    ServerAdmin me@memail.com 
    ErrorLog "example1-error_log" 
    CustomLog "example1-access_log" common 
</VirtualHost>

access_log:

127.0.0.1 - - [date/time] "GET /main/ HTTP/1.1" 200 20
127.0.0.1 - - [date/time] "POST /wp-cron.php?doing_wp_cron=1616560130... HTTP/1.1" 200 20

rewrite.log: I think the "/main/main" are a clue

(3) [perdir C:/MAMP/htdocs/example1-folder/] add path info postfix: C:/MAMP/htdocs/example1-folder/main/main -> C:/MAMP/htdocs/example1-folder/main/main/
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/main/ -> main/main/
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '^index\\.php$' to uri 'main/main/'
(3) [perdir C:/MAMP/htdocs/example1-folder/] add path info postfix: C:/MAMP/htdocs/example1-folder/main/main -> C:/MAMP/htdocs/example1-folder/main/main/
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/main/ -> main/main/
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '.' to uri 'main/main/'
(2) [perdir C:/MAMP/htdocs/example1-folder/] rewrite 'main/main/' -> '/index.php'
(2) [perdir C:/MAMP/htdocs/example1-folder/] trying to replace prefix C:/MAMP/htdocs/example1-folder/ with /
(1) [perdir C:/MAMP/htdocs/example1-folder/] internal redirect with /index.php [INTERNAL REDIRECT]
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/index.php -> main/index.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '^index\\.php$' to uri 'main/index.php'
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/index.php -> main/index.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '.' to uri 'main/index.php'
(1) [perdir C:/MAMP/htdocs/example1-folder/] pass through C:/MAMP/htdocs/example1-folder/main/index.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/wp-cron.php -> main/wp-cron.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '^index\\.php$' to uri 'main/wp-cron.php'
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/wp-cron.php -> main/wp-cron.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '.' to uri 'main/wp-cron.php'
(1) [perdir C:/MAMP/htdocs/example1-folder/] pass through C:/MAMP/htdocs/example1-folder/main/wp-cron.php

When I change DocumentRoot in httpd-vhosts.conf to "C:/MAMP/htdocs/example1-folder", rewrite.log outputs:

(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '^index\\.php$' to uri 'main/'
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/ -> main/
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '.' to uri 'main/'
(1) [perdir C:/MAMP/htdocs/example1-folder/] pass through C:/MAMP/htdocs/example1-folder/main/
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/index.html -> main/index.html
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '^index\\.php$' to uri 'main/index.html'
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/index.html -> main/index.html
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '.' to uri 'main/index.html'
(2) [perdir C:/MAMP/htdocs/example1-folder/] rewrite 'main/index.html' -> '/index.php'
(2) [perdir C:/MAMP/htdocs/example1-folder/] trying to replace prefix C:/MAMP/htdocs/example1-folder/ with /
(1) [perdir C:/MAMP/htdocs/example1-folder/] internal redirect with /index.php [INTERNAL REDIRECT]
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/index.php -> main/index.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '^index\\.php$' to uri 'main/index.php'
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/main/index.php -> main/index.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '.' to uri 'main/index.php'
(1) [perdir C:/MAMP/htdocs/example1-folder/] pass through C:/MAMP/htdocs/example1-folder/main/index.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/wp-cron.php -> wp-cron.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '^index\\.php$' to uri 'wp-cron.php'
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/wp-cron.php -> wp-cron.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '.' to uri 'wp-cron.php'
(2) [perdir C:/MAMP/htdocs/example1-folder/] rewrite 'wp-cron.php' -> '/index.php'
(2) [perdir C:/MAMP/htdocs/example1-folder/] trying to replace prefix C:/MAMP/htdocs/example1-folder/ with /
(1) [perdir C:/MAMP/htdocs/example1-folder/] internal redirect with /index.php [INTERNAL REDIRECT]
(3) [perdir C:/MAMP/htdocs/example1-folder/] strip per-dir prefix: C:/MAMP/htdocs/example1-folder/index.php -> index.php
(3) [perdir C:/MAMP/htdocs/example1-folder/] applying pattern '^index\\.php$' to uri 'index.php'
(1) [perdir C:/MAMP/htdocs/example1-folder/] pass through C:/MAMP/htdocs/example1-folder/index.php

which looks okay to me I think, but access log shows wp-cron error:

127.0.0.1 - - [date/time] "GET /main/ HTTP/1.1" 200 20
127.0.0.1 - - [date/time] "POST /wp-cron.php?doing_wp_cron=1616562053... HTTP/1.1" 404 20

Thanks for any help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.