0

I am using the default Apache + PHP 7.1 on Mojave : (no brew)

Server version: Apache/2.4.34 (Unix)
Server built:   Feb 22 2019 20:20:11

I researched Apache Localhost 403 Forbidden with macOS Sierra, Apache not working after macOS Mojave update but no luck.

http://localhost/phpinfo.php always shows 403 Forbidden.
The last few lines in the log is :

AH00112: Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist
[Wed Sep 04 10:36:34.810934 2019] [mpm_prefork:notice] [pid 801] AH00163: Apache/2.4.34 (Unix) PHP/7.1.23 configured -- resuming normal operations
[Wed Sep 04 10:36:34.811004 2019] [core:notice] [pid 801] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

I uncommented Include /private/etc/apache2/users/*.conf in /etc/apache2/extra/httpd-userdir.conf
I have in my httpd.conf

DocumentRoot "/Users/anjanesh-mac/Sites"
<Directory "/Users/anjanesh-mac/Sites">
    Options FollowSymLinks Multiviews Indexes
    MultiviewsMatch Any    
    AllowOverride All
    Require all granted
</Directory>

and

#LoadModule lbmethod_bytraffic_module libexec/apache2/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_bybusyness_module libexec/apache2/mod_lbmethod_bybusyness.so
##LoadModule lbmethod_heartbeat_module libexec/apache2/mod_lbmethod_heartbeat.so
LoadModule unixd_module libexec/apache2/mod_unixd.so
#LoadModule heartbeat_module libexec/apache2/mod_heartbeat.so
#LoadModule heartmonitor_module libexec/apache2/mod_heartmonitor.so
#LoadModule dav_module libexec/apache2/mod_dav.so
LoadModule status_module libexec/apache2/mod_status.so
LoadModule autoindex_module libexec/apache2/mod_autoindex.so
#LoadModule asis_module libexec/apache2/mod_asis.so
#LoadModule info_module libexec/apache2/mod_info.so
#LoadModule cgi_module libexec/apache2/mod_cgi.so
#LoadModule dav_fs_module libexec/apache2/mod_dav_fs.so
#LoadModule dav_lock_module libexec/apache2/mod_dav_lock.so
#LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
LoadModule negotiation_module libexec/apache2/mod_negotiation.so
LoadModule dir_module libexec/apache2/mod_dir.so
#LoadModule imagemap_module libexec/apache2/mod_imagemap.so
#LoadModule actions_module libexec/apache2/mod_actions.so
#LoadModule speling_module libexec/apache2/mod_speling.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule alias_module libexec/apache2/mod_alias.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php7_module libexec/apache2/libphp7.so
#LoadModule perl_module libexec/apache2/mod_perl.so
LoadModule hfs_apple_module libexec/apache2/mod_hfs_apple.so

I also did chmod 644 phpinfo.php
Is there anything else I am missing ?

You must log in to answer this question.

Browse other questions tagged .