website's subpages are returning 404 errors in MAMP, home page works

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
EmD
Posts: 4
Joined: Sun Feb 07, 2021 9:04 pm

website's subpages are returning 404 errors in MAMP, home page works

Post by EmD »

I have read posts and articles about this issue but none of the solutions have worked for me. I copied a live site into MAMP and uploaded the existing database. The homepage displays properly in MAMP, but every subpage and /user results in a 404 error. Entering an admin URL DOES return the Access Denied page properly: http://produceavailable-drupal7.local/admin/reports/status

Below are all the things I have made changes to.

settings.php

Code: Select all

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'produce7',
      'username' => 'root',
      'password' => 'root',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);
terminal sudo vi /etc/hosts:

Code: Select all

# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       produceavailable-drupal7.local
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
httpd.conf

Code: Select all

# This is the main Apache HTTP server configuration file.
#
ServerRoot "/Applications/MAMP/Library"
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
<IfModule !mpm_netware.c>
PidFile logs/httpd.pid
</IfModule>

#
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
#
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
#
# Mutex default:"/Applications/MAMP/Library/logs"

#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule auth_form_module modules/mod_auth_form.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_dbd_module modules/mod_authz_dbd.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule bucketeer_module modules/mod_bucketeer.so
LoadModule buffer_module modules/mod_buffer.so
LoadModule cache_module modules/mod_cache.so
LoadModule case_filter_in_module modules/mod_case_filter_in.so
LoadModule case_filter_module modules/mod_case_filter.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule charset_lite_module modules/mod_charset_lite.so
LoadModule dav_module modules/mod_dav.so
LoadModule dbd_module modules/mod_dbd.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
LoadModule dumpio_module modules/mod_dumpio.so
LoadModule echo_module modules/mod_echo.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule fastcgi_module modules/mod_fastcgi.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule filter_module modules/mod_filter.so
LoadModule headers_module modules/mod_headers.so
LoadModule http2_module modules/mod_http2.so
LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule log_debug_module modules/mod_log_debug.so
LoadModule logio_module modules/mod_logio.so
LoadModule macro_module modules/mod_macro.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule perl_module modules/mod_perl.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule ratelimit_module modules/mod_ratelimit.so
LoadModule remoteip_module modules/mod_remoteip.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule request_module modules/mod_request.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule sed_module modules/mod_sed.so
LoadModule session_module modules/mod_session.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
LoadModule socache_dbm_module modules/mod_socache_dbm.so
LoadModule socache_memcache_module modules/mod_socache_memcache.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule speling_module modules/mod_speling.so
#
# Starting v5.7 ssl_module is statically compiled into Apache and 
# doesn't need to be enabled / can not be disabled. 
#
LoadModule status_module modules/mod_status.so
LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule version_module modules/mod_version.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule watchdog_module modules/mod_watchdog.so
LoadModule wsgi_module modules/mod_wsgi.so
LoadModule xsendfile_module modules/mod_xsendfile.so

LoadModule php5_module        /Applications/MAMP/bin/php/php5.6.40/modules/libphp5.so

#
AddType application/x-httpd-php .php .phtml

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User emd2020
Group #-1

</IfModule>

<IfModule xsendfile_module>
    XSendFile on
</IfModule>

# 'Main' server configuration
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin you@example.com

#
ServerName localhost:80

#
# MAMP DOCUMENT_ROOT !! Don't remove this line !!
DocumentRoot "/Applications/MAMP/htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# First, we configure the "default" to be a very restrictive set of 
# features.  
#
<Directory />
    Options Indexes FollowSymLinks
    AllowOverride All
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/Applications/MAMP/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options All

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
    
    XSendFilePath "/Applications/MAMP/htdocs"
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php

    <IfModule perl_module>
        DirectoryIndex index.pl
    </IfModule>

    <IfModule wsgi_module>
        DirectoryIndex index.wsgi index.py
    </IfModule>

</IfModule>

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride 
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<FilesMatch "^\.ht">
    Require all denied
    Satisfy All
</FilesMatch>

<Files ~ "^\.DS_Store">
    Require all denied
</Files>

#
# ErrorLog: The location of the error log file.
#
ErrorLog "/Applications/MAMP/logs/apache_error.log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel error

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    #
    CustomLog "/Applications/MAMP/logs/apache_access.log" combined
</IfModule>

<IfModule alias_module>
    #
 
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.
    #
    # We include the /icons/ alias for FancyIndexed directory listings.  If you
    # do not use FancyIndexing, you may comment this out.
    #
    
    Alias /favicon.ico "/Applications/MAMP/bin/favicon.ico"
    
    Alias /icons/ "/Applications/MAMP/Library/icons/"
    
    <Directory "/Applications/MAMP/Library/icons">
        Options Indexes MultiViews
        AllowOverride None
        Require all granted
    </Directory>
    
    Alias /phpMyAdmin "/Applications/MAMP/bin/phpMyAdmin"
    Alias /phpmyadmin "/Applications/MAMP/bin/phpMyAdmin"
    
    <Directory "/Applications/MAMP/bin/phpMyAdmin">
        Options Indexes MultiViews
        AllowOverride None
        Require all granted
    </Directory>
    
    Alias /phpPgAdmin "/Applications/MAMP/bin/phpPgAdmin"
    Alias /phppgadmin "/Applications/MAMP/bin/phpPgAdmin"
    
    <Directory "/Applications/MAMP/bin/phpPgAdmin">
        Options Indexes MultiViews
        AllowOverride None
        Require all granted
    </Directory>
    
    Alias /phpLiteAdmin "/Applications/MAMP/bin/phpLiteAdmin"
    Alias /phpliteadmin "/Applications/MAMP/bin/phpLiteAdmin"
    
    <Directory "/Applications/MAMP/bin/phpLiteAdmin">
        Options Indexes MultiViews
        AllowOverride None
        Require all granted
    </Directory>
    
    Alias /MAMP "/Applications/MAMP/bin/mamp"
    
    <Directory "/Applications/MAMP/bin/mamp">
        Options Indexes MultiViews
        AllowOverride None
        Require all granted
    </Directory>
    
    Alias /adminer "/Applications/MAMP/bin/adminer"

    <Directory "/Applications/MAMP/bin/adminer">
        DirectoryIndex adminer.php
        Options Indexes MultiViews
        AllowOverride None
        Require all granted
    </Directory>
    
    #
    # ScriptAlias: This controls which directories contain server scripts. 
    #
    ScriptAlias /cgi-bin/ "/Applications/MAMP/cgi-bin/"

    Alias /perl/ "/Applications/MAMP/cgi-bin/"

    <IfModule perl_module>
        PerlModule ModPerl::Registry
        <Location /perl>
            SetHandler perl-script
            PerlResponseHandler ModPerl::Registry
            PerlOptions +ParseHeaders
            Options +ExecCGI
        </Location>
    </IfModule>
</IfModule>

<IfModule cgid_module>
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock logs/cgisock
</IfModule>

#
# "/Applications/MAMP/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/Applications/MAMP/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule headers_module>
    #
    # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
    # backend servers which have lingering "httpoxy" defects.
    # 'Proxy' request header is undefined by the IETF, not listed by IANA
    #
    RequestHeader unset Proxy early
</IfModule>

#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /Applications/MAMP/conf/apache/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    AddHandler cgi-script .cgi .pl

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
<IfModule mime_magic_module>
    MIMEMagicFile /Applications/MAMP/conf/apache/magic
</IfModule>

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
#EnableSendfile off

# Supplemental configuration
#
# The configuration files in the /Applications/MAMP/conf/apache/extra/ directory can be 
# included to add extra features or to modify the default configuration of 
# the server, or you may simply copy their contents here and change as 
# necessary.

# Server-pool management (MPM specific)
#Include /Applications/MAMP/conf/apache/extra/httpd-mpm.conf

# Multi-language error messages
#Include /Applications/MAMP/conf/apache/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include /Applications/MAMP/conf/apache/extra/httpd-autoindex.conf

# Language settings
#Include /Applications/MAMP/conf/apache/extra/httpd-languages.conf

# User home directories
#Include /Applications/MAMP/conf/apache/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include /Applications/MAMP/conf/apache/extra/httpd-info.conf

# Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include /Applications/MAMP/conf/apache/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include /Applications/MAMP/conf/apache/extra/httpd-dav.conf

# Various default settings
#Include /Applications/MAMP/conf/apache/extra/httpd-default.conf

# Secure (SSL/TLS) connections
#Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup file:/dev/urandom 1024
SSLRandomSeed connect file:/dev/urandom 1024
    
#
# Uncomment the next line if Apache should not accept SSLv3 connections, to learn more google for "POODLE SSLv3".
# SSLProtocol All -SSLv2 -SSLv3 
</IfModule>
httpd-vhosts.conf

Code: Select all

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
    DocumentRoot "/Applications/MAMP/htdocs"
    ServerName localhost
</VirtualHost> 

<VirtualHost *:80>
    DocumentRoot "/Users/emd2020/Sites/produceavailable-drupal7"    
    ServerName produceavailable-drupal7.local
</VirtualHost>
.htaccess

Code: Select all

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
  </IfModule>
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php index.html index.htm

# Override PHP settings that cannot be changed at runtime. See
# sites/default/default.settings.php and drupal_environment_initialize() in
# includes/bootstrap.inc for settings that can be changed at runtime.

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_flag mbstring.encoding_translation    off
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  <FilesMatch \.php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non-Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off
  </FilesMatch>
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # Set "protossl" to "s" if we were accessed via https://.  This is used later
  # if you enable "www." stripping or enforcement, in order to ensure that
  # you don't bounce between http and https.
  RewriteRule ^ - [E=protossl]
  RewriteCond %{HTTPS} on
  RewriteRule ^ - [E=protossl:s]

  # Make sure Authorization HTTP header is available to PHP
  # even when running as CGI or FastCGI.
  RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

  # Block access to "hidden" directories whose names begin with a period. This
  # includes directories used by version control systems such as Subversion or
  # Git to store control files. Files whose names begin with a period, as well
  # as the control files used by CVS, are protected by the FilesMatch directive
  # above.
  #
  # NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
  # not possible to block access to entire directories from .htaccess, because
  # <DirectoryMatch> is not allowed here.
  #
  # If you do not have mod_rewrite installed, you should remove these
  # directories from your webroot or otherwise protect them from being
  # downloaded.
  RewriteRule "/\.|^\.(?!well-known/)" - [F]

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # uncomment the following:
  # RewriteCond %{HTTP_HOST} .
  # RewriteCond %{HTTP_HOST} !^www\. [NC]
  # RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment the following:
  # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  # RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Pass all requests not referring directly to files in the filesystem to
  # index.php. Clean URLs are handled in drupal_environment_initialize().
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^ index.php [L]

  # Rules to correctly serve gzip compressed CSS and JS files.
  # Requires both mod_rewrite and mod_headers to be enabled.
  <IfModule mod_headers.c>
    # Serve gzip compressed CSS files if they exist and the client accepts gzip.
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}\.gz -s
    RewriteRule ^(.*)\.css $1\.css\.gz [QSA]

    # Serve gzip compressed JS files if they exist and the client accepts gzip.
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME}\.gz -s
    RewriteRule ^(.*)\.js $1\.js\.gz [QSA]

    # Serve correct content types, and prevent mod_deflate double gzip.
    RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
    RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]

    <FilesMatch "(\.js\.gz|\.css\.gz)$">
      # Serve correct encoding type.
      Header set Content-Encoding gzip
      # Force proxies to cache gzipped & non-gzipped css/js files separately.
      Header append Vary Accept-Encoding
    </FilesMatch>
  </IfModule>
</IfModule>

# Add headers to all responses.
<IfModule mod_headers.c>
  # Disable content sniffing, since it's an attack vector.
  Header always set X-Content-Type-Options nosniff
</IfModule>
Ports set to 80. Mysql port is 3306.

I'm not sure what else to try.
mampsupportmod
Site Admin
Posts: 156
Joined: Wed Jan 20, 2021 3:06 am

Re: website's subpages are returning 404 errors in MAMP, home page works

Post by mampsupportmod »

MAMP Pro for Mac? It's likely a permissions issue on the host folder preventing reading.
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
EmD
Posts: 4
Joined: Sun Feb 07, 2021 9:04 pm

Re: website's subpages are returning 404 errors in MAMP, home page works

Post by EmD »

I have just MAMP, not MAMP Pro. Here is what Terminal reports. produceavailable-drupal7 is the one I'm trying to access:

Code: Select all

-rwxr-xr-x@  1 emd2020  staff  323155 Feb  6 14:32 different-php-version.pages
drwxr-xr-x   3 emd2020  staff      96 Feb  1 09:55 localhost
drwxrwxr-x  33 emd2020  staff    1056 Feb  6 15:59 produceavailable-drupal7

-rw-r--r--@  1 emd2020  staff  115881 Nov 17 22:07 CHANGELOG.txt
-rw-r--r--@  1 emd2020  staff    1481 Nov 17 22:07 COPYRIGHT.txt
-rw-r--r--@  1 emd2020  staff    1717 Nov 17 22:07 INSTALL.mysql.txt
-rw-r--r--@  1 emd2020  staff    1874 Nov 17 22:07 INSTALL.pgsql.txt
-rw-r--r--@  1 emd2020  staff    1298 Nov 17 22:07 INSTALL.sqlite.txt
-rw-r--r--@  1 emd2020  staff   17995 Nov 17 22:07 INSTALL.txt
-rw-r--r--@  1 emd2020  staff   18092 Nov 16  2016 LICENSE.txt
-rw-r--r--@  1 emd2020  staff    8465 Nov 17 22:07 MAINTAINERS.txt
-rw-r--r--@  1 emd2020  staff    5382 Nov 17 22:07 README.txt
-rw-r--r--@  1 emd2020  staff   10123 Nov 17 22:07 UPGRADE.txt
-rw-r--r--@  1 emd2020  staff    6604 Nov 17 22:07 authorize.php
-rw-r--r--@  1 emd2020  staff     720 Nov 17 22:07 cron.php
drwxr-xr-x  51 emd2020  staff    1632 Feb  5 15:56 includes
-rw-r--r--@  1 emd2020  staff     529 Nov 17 22:07 index.php
-rw-r--r--@  1 emd2020  staff     703 Nov 17 22:07 install.php
drwxr-xr-x  76 emd2020  staff    2432 Feb  5 16:05 misc
drwxr-xr-x  43 emd2020  staff    1376 Feb  5 16:34 modules
-rw-r--r--@  1 emd2020  staff      20 Dec  2 13:52 phpinfo.php
drwxr-xr-x   6 emd2020  staff     192 Feb  5 16:35 profiles
-rw-r--r--@  1 emd2020  staff    2189 Nov 17 22:07 robots.txt
drwxr-xr-x  13 emd2020  staff     416 Feb  5 16:35 scripts
drwxr-xr-x   7 emd2020  staff     224 Feb  6 10:44 sites
drwxr-xr-x   8 emd2020  staff     256 Feb  5 17:57 themes
-rw-r--r--@  1 emd2020  staff   19986 Nov 17 22:07 update.php
-rw-r--r--@  1 emd2020  staff    2211 Nov 17 22:07 web.config
-rw-r--r--@  1 emd2020  staff     417 Nov 17 22:07 xmlrpc.php
mampsupportmod
Site Admin
Posts: 156
Joined: Wed Jan 20, 2021 3:06 am

Re: website's subpages are returning 404 errors in MAMP, home page works

Post by mampsupportmod »

Can you share what the Apache access/error logs are saying for the requests?
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
EmD
Posts: 4
Joined: Sun Feb 07, 2021 9:04 pm

Re: website's subpages are returning 404 errors in MAMP, home page works

Post by EmD »

I understand none of this...

Code: Select all

[Mon Feb 01 09:55:46.546867 2021] [:notice] [pid 1011] FastCGI: process manager initialized (pid 1011)
[Mon Feb 01 09:55:46.548078 2021] [mpm_prefork:notice] [pid 1009] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Mon Feb 01 09:55:46.548628 2021] [core:notice] [pid 1009] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd -f /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf'
[Mon Feb 01 10:02:14.592106 2021] [mpm_prefork:notice] [pid 1009] AH00169: caught SIGTERM, shutting down
[Mon Feb 01 10:17:44.991537 2021] [:notice] [pid 2380] FastCGI: process manager initialized (pid 2380)
[Mon Feb 01 10:17:44.993243 2021] [mpm_prefork:notice] [pid 2330] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Mon Feb 01 10:17:44.993559 2021] [core:notice] [pid 2330] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Mon Feb 01 11:59:39.972659 2021] [mpm_prefork:notice] [pid 2330] AH00171: Graceful restart requested, doing restart
[Mon Feb 01 11:59:45.160220 2021] [:notice] [pid 4251] FastCGI: process manager initialized (pid 4251)
[Mon Feb 01 11:59:45.160405 2021] [mpm_prefork:notice] [pid 2330] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Mon Feb 01 11:59:45.160962 2021] [core:notice] [pid 2330] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Mon Feb 01 12:49:22.901679 2021] [mpm_prefork:notice] [pid 2330] AH00169: caught SIGTERM, shutting down
[Mon Feb 01 13:07:29.681842 2021] [:notice] [pid 5305] FastCGI: process manager initialized (pid 5305)
[Mon Feb 01 13:07:29.687540 2021] [mpm_prefork:notice] [pid 5299] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Mon Feb 01 13:07:29.688017 2021] [core:notice] [pid 5299] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd -f /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf'
[Mon Feb 01 13:12:20.122222 2021] [mpm_prefork:notice] [pid 5299] AH00169: caught SIGTERM, shutting down
[Mon Feb 01 13:12:22.027833 2021] [:notice] [pid 6122] FastCGI: process manager initialized (pid 6122)
[Mon Feb 01 13:12:22.033070 2021] [mpm_prefork:notice] [pid 6116] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Mon Feb 01 13:12:22.033561 2021] [core:notice] [pid 6116] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd -f /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf'
[Mon Feb 01 14:50:41.584161 2021] [mpm_prefork:notice] [pid 6116] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 10:58:03.676464 2021] [:notice] [pid 1161] FastCGI: process manager initialized (pid 1161)
[Fri Feb 05 10:58:03.678070 2021] [mpm_prefork:notice] [pid 1110] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 10:58:03.678383 2021] [core:notice] [pid 1110] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:10:29.092564 2021] [mpm_prefork:notice] [pid 1110] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:10:39.876326 2021] [:notice] [pid 1687] FastCGI: process manager initialized (pid 1687)
[Fri Feb 05 11:10:39.878352 2021] [mpm_prefork:notice] [pid 1636] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:10:39.878788 2021] [core:notice] [pid 1636] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:24:46.446262 2021] [core:notice] [pid 1636] AH00052: child pid 1692 exit signal Abort trap (6)
[Fri Feb 05 11:24:46.513001 2021] [mpm_prefork:notice] [pid 1636] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:24:57.683337 2021] [:notice] [pid 2414] FastCGI: process manager initialized (pid 2414)
[Fri Feb 05 11:24:57.685334 2021] [mpm_prefork:notice] [pid 2363] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:24:57.685730 2021] [core:notice] [pid 2363] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:31:59.648525 2021] [mpm_prefork:notice] [pid 2363] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:32:10.304398 2021] [:notice] [pid 2864] FastCGI: process manager initialized (pid 2864)
[Fri Feb 05 11:32:10.306444 2021] [mpm_prefork:notice] [pid 2813] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:32:10.306812 2021] [core:notice] [pid 2813] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:32:38.061861 2021] [mpm_prefork:notice] [pid 2813] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:32:48.320643 2021] [:notice] [pid 3133] FastCGI: process manager initialized (pid 3133)
[Fri Feb 05 11:32:48.322714 2021] [mpm_prefork:notice] [pid 3082] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:32:48.323070 2021] [core:notice] [pid 3082] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:38:32.273503 2021] [mpm_prefork:notice] [pid 3082] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:38:42.880579 2021] [:notice] [pid 3559] FastCGI: process manager initialized (pid 3559)
[Fri Feb 05 11:38:42.882416 2021] [mpm_prefork:notice] [pid 3510] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:38:42.882698 2021] [core:notice] [pid 3510] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:41:42.115598 2021] [mpm_prefork:notice] [pid 3510] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:41:52.639092 2021] [:notice] [pid 3886] FastCGI: process manager initialized (pid 3886)
[Fri Feb 05 11:41:52.641088 2021] [mpm_prefork:notice] [pid 3835] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:41:52.641461 2021] [core:notice] [pid 3835] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:47:47.880274 2021] [mpm_prefork:notice] [pid 3835] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:47:58.431939 2021] [:notice] [pid 4309] FastCGI: process manager initialized (pid 4309)
[Fri Feb 05 11:47:58.434209 2021] [mpm_prefork:notice] [pid 4259] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:47:58.434606 2021] [core:notice] [pid 4259] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:49:13.835519 2021] [mpm_prefork:notice] [pid 4259] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:49:30.875615 2021] [:notice] [pid 4642] FastCGI: process manager initialized (pid 4642)
[Fri Feb 05 11:49:30.877779 2021] [mpm_prefork:notice] [pid 4590] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:49:30.878191 2021] [core:notice] [pid 4590] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:51:32.253569 2021] [mpm_prefork:notice] [pid 4590] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:51:42.741900 2021] [:notice] [pid 5056] FastCGI: process manager initialized (pid 5056)
[Fri Feb 05 11:51:42.743979 2021] [mpm_prefork:notice] [pid 5002] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:51:42.744381 2021] [core:notice] [pid 5002] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:54:42.422025 2021] [mpm_prefork:notice] [pid 5002] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:54:55.178668 2021] [:notice] [pid 5326] FastCGI: process manager initialized (pid 5326)
[Fri Feb 05 11:54:55.179190 2021] [mpm_prefork:notice] [pid 5300] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:54:55.179571 2021] [core:notice] [pid 5300] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 11:54:55.799087 2021] [mpm_prefork:notice] [pid 5300] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 11:56:48.857171 2021] [:notice] [pid 5560] FastCGI: process manager initialized (pid 5560)
[Fri Feb 05 11:56:48.857347 2021] [mpm_prefork:notice] [pid 5511] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 11:56:48.857768 2021] [core:notice] [pid 5511] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 12:43:10.258190 2021] [mpm_prefork:notice] [pid 5511] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 12:43:21.172947 2021] [:notice] [pid 6896] FastCGI: process manager initialized (pid 6896)
[Fri Feb 05 12:43:21.173735 2021] [mpm_prefork:notice] [pid 6844] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 12:43:21.174179 2021] [core:notice] [pid 6844] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Fri Feb 05 15:04:36.268586 2021] [mpm_prefork:notice] [pid 6844] AH00169: caught SIGTERM, shutting down
[Fri Feb 05 15:29:23.552168 2021] [:notice] [pid 8966] FastCGI: process manager initialized (pid 8966)
[Fri Feb 05 15:29:23.552346 2021] [mpm_prefork:notice] [pid 8915] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Fri Feb 05 15:29:23.552902 2021] [core:notice] [pid 8915] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Sat Feb 06 10:43:33.662999 2021] [mpm_prefork:notice] [pid 8915] AH00169: caught SIGTERM, shutting down
[Sat Feb 06 10:43:45.489711 2021] [:notice] [pid 12920] FastCGI: process manager initialized (pid 12920)
[Sat Feb 06 10:43:45.490914 2021] [mpm_prefork:notice] [pid 12870] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Sat Feb 06 10:43:45.491295 2021] [core:notice] [pid 12870] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Sat Feb 06 10:45:45.363723 2021] [mpm_prefork:notice] [pid 12870] AH00169: caught SIGTERM, shutting down
[Sat Feb 06 10:45:55.697397 2021] [:notice] [pid 13260] FastCGI: process manager initialized (pid 13260)
[Sat Feb 06 10:45:55.697856 2021] [mpm_prefork:notice] [pid 13209] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Sat Feb 06 10:45:55.698297 2021] [core:notice] [pid 13209] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Sat Feb 06 11:19:03.158590 2021] [mpm_prefork:notice] [pid 13209] AH00169: caught SIGTERM, shutting down
[Sat Feb 06 11:19:13.776232 2021] [:notice] [pid 13967] FastCGI: process manager initialized (pid 13967)
[Sat Feb 06 11:19:13.777200 2021] [mpm_prefork:notice] [pid 13926] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Sat Feb 06 11:19:13.777674 2021] [core:notice] [pid 13926] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Sat Feb 06 11:19:44.188004 2021] [mpm_prefork:notice] [pid 13926] AH00169: caught SIGTERM, shutting down
[Sat Feb 06 11:23:06.060314 2021] [:notice] [pid 14331] FastCGI: process manager initialized (pid 14331)
[Sat Feb 06 11:23:06.060377 2021] [mpm_prefork:notice] [pid 14280] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/5.6.40 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Sat Feb 06 11:23:06.060902 2021] [core:notice] [pid 14280] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Sat Feb 06 11:34:49.900328 2021] [mpm_prefork:notice] [pid 14280] AH00169: caught SIGTERM, shutting down
[Sat Feb 06 11:35:15.358708 2021] [:notice] [pid 14938] FastCGI: process manager initialized (pid 14938)
[Sat Feb 06 11:35:15.358750 2021] [mpm_prefork:notice] [pid 14888] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/5.6.40 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Sat Feb 06 11:35:15.359199 2021] [core:notice] [pid 14888] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Sat Feb 06 12:16:06.668880 2021] [mpm_prefork:notice] [pid 14888] AH00169: caught SIGTERM, shutting down
[Sat Feb 06 12:16:31.816634 2021] [:notice] [pid 15666] FastCGI: process manager initialized (pid 15666)
[Sat Feb 06 12:16:31.816728 2021] [mpm_prefork:notice] [pid 15616] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/5.6.40 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Sat Feb 06 12:16:31.817197 2021] [core:notice] [pid 15616] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Sat Feb 06 21:56:13.807252 2021] [mpm_prefork:notice] [pid 15616] AH00169: caught SIGTERM, shutting down
[Mon Feb 08 09:05:53.163118 2021] [mpm_prefork:notice] [pid 920] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/5.6.40 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Mon Feb 08 09:05:53.163131 2021] [:notice] [pid 971] FastCGI: process manager initialized (pid 971)
[Mon Feb 08 09:05:53.163754 2021] [core:notice] [pid 920] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd'
[Mon Feb 08 21:26:32.790833 2021] [mpm_prefork:notice] [pid 920] AH00169: caught SIGTERM, shutting down
mampsupportmod
Site Admin
Posts: 156
Joined: Wed Jan 20, 2021 3:06 am

Re: website's subpages are returning 404 errors in MAMP, home page works

Post by mampsupportmod »

Your Apache isn't staying started. Are you seeing it on in MAMP when you try to browse?
I suspect you might have 2 Apache processes going (Mac's built-in process and then Mamp's). Check activity viewer.
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
EmD
Posts: 4
Joined: Sun Feb 07, 2021 9:04 pm

Re: website's subpages are returning 404 errors in MAMP, home page works

Post by EmD »

mampsupportmod wrote: Wed Feb 10, 2021 12:11 pm Your Apache isn't staying started. Are you seeing it on in MAMP when you try to browse?
I suspect you might have 2 Apache processes going (Mac's built-in process and then Mamp's). Check activity viewer.
The start/stop button is always green so I can't tell that this is occurring. Can you tell me where the Activity Viewer is? When I look at my Mac I see Activity Monitor but it doesn't list MAMP or Apache.

Looking at other logs I see these errors in the php_error.log

Code: Select all

[01-Feb-2021 14:00:01 America/Mexico_City] PHP Warning:  POST Content-Length of 10843648 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
[06-Feb-2021 10:29:06 America/Los_Angeles] PHP Fatal error:  Cannot redeclare views_views_plugins() (previously declared in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/views/includes/plugins.inc:15) in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/unused/views/includes/plugins.inc on line 405
[06-Feb-2021 10:29:18 America/Los_Angeles] PHP Fatal error:  Cannot redeclare views_views_plugins() (previously declared in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/views/includes/plugins.inc:15) in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/unused/views/includes/plugins.inc on line 405
[06-Feb-2021 13:55:43 America/Los_Angeles] PHP Fatal error:  Cannot redeclare views_views_plugins() (previously declared in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/views/includes/plugins.inc:15) in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/unused/views/includes/plugins.inc on line 405
[06-Feb-2021 13:58:10 America/Los_Angeles] PHP Fatal error:  Cannot redeclare views_views_plugins() (previously declared in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/views/includes/plugins.inc:15) in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/unused/views/includes/plugins.inc on line 405
[06-Feb-2021 16:58:21 America/Los_Angeles] PHP Fatal error:  Cannot redeclare views_views_plugins() (previously declared in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/views/includes/plugins.inc:15) in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/unused/views/includes/plugins.inc on line 405
[08-Feb-2021 07:06:26 America/Los_Angeles] PHP Fatal error:  Cannot redeclare views_views_plugins() (previously declared in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/views/includes/plugins.inc:15) in /Users/emd2020/Sites/produceavailable-drupal7/sites/all/modules/unused/views/includes/plugins.inc on line 405
Yet the site works online.
kevin sean
Posts: 1
Joined: Sun Feb 14, 2021 7:01 pm

Re: website's subpages are returning 404 errors in MAMP, home page works

Post by kevin sean »

I'm having the same problem. Did you use WP duplicator to install your sites like me?

I think it is a mod rewrite issue with Apache, that is that mod rewrite is turned off. I tried these solutions but none worked.

https://snapcreek.com/duplicator/docs/f ... ller-200-q



following
Kevin
gbouhier
Posts: 1
Joined: Wed Feb 02, 2022 11:30 am

Re: website's subpages are returning 404 errors in MAMP, home page works

Post by gbouhier »

Hello EmD,

I have the same issue with the same logs.

I am on a fresh new installation of mamp with virtual host. Did you manage to find a solution please ?
Post Reply