I had finally got my PHP and MySQL to work again and then I decided to set up local virtual host. Everything was working perfectly up to that point. I have been getting error messages when I do apachectl configtest
. My first error message was:
httpd:Syntax error on line 483 of /private/etc/apache2/httpd.conf
Mac OS X. There was another error on a line in the /private/etc/apache2/extra/httpd-vhosts.conf
as well, but I can't remember which line. I tried everything to find the errors. Then I ran across question on your forum "Can't access apache-powered website at localhost [duplicate] and followed those instructions to reinstall Apache. I did a configtest first and got:
[Thu Aug 09 05:41:07 2018] [warn] module php5_module is already loaded, skipping
httpd: Syntax error on line 483 of /private/etc/apache2/httpd.conf: Syntax error on line 40 of /private/etc/apache2/extra/httpd-vhosts.conf: </VirtualHost> without matching <VirtualHost> section
Then I downloaded the duplicate https.conf file and got this error message:
Malindas-Mac:~ malindasmith$ apachectl configtest
httpd: Syntax error on line 71 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_authn_core.so into server: dlopen(/usr/libexec/apache2/mod_authn_core.so, 10): image not found
I had originally created 3 virtual hosts and rearranged my files from htdocs to the local Sites folder. What am I doing wrong?
Specs:
2.26 GHz Intel Core 2 Duo 2 GB 1067 MHz DDR3 OS X 10.9.5
I finally got my virtual host responding:
[Sat Aug 11 11:39:50 2018] [warn] module php5_module is already loaded, skipping
WARNING: MaxClients of 150 exceeds ServerLimit value of 133 servers,
lowering MaxClients to 133. To increase, please see the ServerLimit
directive.
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server theindieconnection (/private/etc/apache2/extra/httpd-vhosts.conf:28)
port 80 namevhost theindieconnection (/private/etc/apache2/extra/httpd-vhosts.conf:28)
port 80 namevhost dreamweaver.site (/private/etc/apache2/extra/httpd-vhosts.conf:43)
Syntax OK
But I was only able to view the default virtual host and the second site would access the index page from the default and I still couldn't access localhost through MAMP. Then, it stopped working again after I altered the Virtualhost files and permissions:
Malindas-Mac:conf malindasmith$ /Applications/MAMP/Library/bin/apachectl stop
httpd: Syntax error on line 62 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Users/malindasmith/Sites/modules/mod_authn_file.so into server: dlopen(/Users/malindasmith/Sites/modules/mod_authn_file.so, 10): image not found
Then after trying to clean up my mess, I get:
httpd: Syntax error on line 62 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Library/WebServer/Documents/modules/mod_authn_file.so into server: dlopen(/Library/WebServer/Documents/modules/mod_authn_file.so, 10): image not found
All the files that showing errors are modules pertaining to authentication. I just can't figure it out.