I'm trying to build an Virtual Host on my Mac OS, but it's not working.
The apache2/error_log recorded the follow message
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Fri May 03 15:34:57 2013] [notice] Digest: generating secret for digest authentication ...
[Fri May 03 15:34:57 2013] [notice] Digest: done
[Fri May 03 15:34:58 2013] [notice] Apache/2.2.22 (Unix) DAV/2 configured -- resuming normal operations
[Fri May 03 15:35:16 2013] [error] [client 127.0.0.1] File does not exist: /usr/htdocs
[Fri May 03 15:35:16 2013] [error] [client 127.0.0.1] File does not exist: /usr/htdocs
And the browser return this....
Not Found
The requested URL / was not found on this server.
Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch Server at dev.myhost.test Port 80
I've stayed a long time trying to fix this. But I didn't succeed...
Here ir my /etc/apache2/extra/httpd-vhosts.conf
NameVirtualHost *:80
<Directory "/Applications/XAMPP/htdocs/">
Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/htdocs/smileflame"
ServerName dev.smileflame.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/htdocs/teste"
ServerName dev.myhost.test
</VirtualHost>
The next is my /etc/hosts
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 dev.myhost.test
I would like this vhost redirect to my index.php... But this is not happening... Anybody know why????
Don't make two /etc/hosts
entries with the same IP. Put the aliases on the same line:
127.0.0.1 localhost dev.myhost.test
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.