Some time ago, some people on this list helped me setting
up virtual hosts on my Mac.
Everything worked fine until I started adding MySQL stuff to
my website ; then something strange started to happen : the MySQL
is correctly found and displayed if I apply some curious workaround,
but not if I do things the normal way.
Here are the relevant details : My /private/etc/hosts file contains
the following lines :
127.0.0.1 localhost
127.0.0.1 localmicael.com www.localmicael.com
::1 localhost
My /private/etc/apache2/extra/httpd-vhosts.conf contains the following
lines :
<VirtualHost *:80>
ServerName localmicael.com
ServerAlias www.localmicael.com
DocumentRoot "/Users/myusernamehere/Documents/Sites/Mikeal/public_html"
ErrorLog "/private/var/log/apache2/localmicael.com-error_log"
CustomLog "/private/var/log/apache2/localmicael.com-access_log" common
ServerAdmin [email protected]
LoadModule php5_module /usr/libexec/apache2/libphp5.so
<Directory /Users/myusernamehere/Documents/Sites/Mikeal/public_html>
Require all granted
DirectoryIndex index.php
</Directory>
</VirtualHost>
If I type localhost:8888/Mikeal in my browser, the index page is displayed
correctly.
If I type http://www.localmicael.com, however, I get an error message
telling me the MySQL database could not be found.
How can I fix this ? Any help appreciated.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]