Solved. OSX 10.7.2. Virtual hosts stopped working after upd…

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Solved. OSX 10.7.2. Virtual hosts stopped working after upd…

Postby supervova » 15. October 2011 10:21

I'll appreciate any tips and suggestions.

Example of my virtual hosts setup

NameVirtualHost *:80

<VirtualHost *:80>
ServerName nickysheen.dev
ServerAlias www.nickysheen.dev
DocumentRoot "/Users/vova/Sites/homepage"
<Directory "/Users/vova/Sites/homepage">
Options Indexes FollowSymLinks Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
AddType text/html .htm
AddHandler server-parsed .htm
DirectoryIndex index.htm index.php
ErrorLog "logs/nickysheen-error.log"
CustomLog "logs/nickysheen-access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerName polylog.dev
ServerAlias www.polylog.dev
DocumentRoot "/Users/vova/Sites/polylog"
<Directory "/Users/vova/Sites/polylog">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
AddType text/html .htm
AddHandler server-parsed .htm
DirectoryIndex index.htm index.php
ErrorLog "logs/polylog-error.log"
CustomLog "logs/polylog-access.log" common
</VirtualHost>
Last edited by supervova on 19. October 2011 23:15, edited 1 time in total.
supervova
 
Posts: 7
Joined: 15. October 2011 10:11

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby Sharley » 15. October 2011 10:34

What version of XAMPP?
Please read the following 'How To' Announcements.
viewtopic.php?f=29&t=48333
viewtopic.php?f=29&t=32672

'Stopped working' is not helpful for troubleshooting. :shock:

Please provide more details especially error messages and error log file contents related to your 'stopped working' issue, also what you see etc as we can't help without more details.

Did the vhosts configuration work before your update?

Did you change anything in XAMPP after the update, etc.?

Thanks. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby supervova » 15. October 2011 11:19

Thanks, Sharley, for quick response :)
I'll try to describe the problem, though the server configuration is too hard for me and my English is not very good. So…

XAMPP version is 1.7.3

Vhosts configuration work fine before the update.
I didn't change anything in XAMPP after the update.

After I've updated Mac OS up to 10.7.2. browsers can not find any of my local sites.

For example, when I try to open frontpage of my www.polylog.dev, I get the Firefox message:
Server not found. Firefox can't find the server at www.polylog.dev. Check the address for typing errors such as...


After updating the records do not appear in the error logs.
Image
Image

But maybe I search in wrong log files?

And here my etc/hosts file is

Code: Select all
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

127.0.0.1       nickysheen.dev
127.0.0.1       www.nickysheen.dev
127.0.0.1       polylog.dev
127.0.0.1       www.polylog.dev

 [...]

#Added by XAMPP Control
127.0.0.1 supervova-mac
#Added by XAMPP Control
127.0.0.1 supervova-mac.local
supervova
 
Posts: 7
Joined: 15. October 2011 10:11

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby JonB » 15. October 2011 21:37

see if the update cleaned out your hosts file.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby supervova » 15. October 2011 22:53

JonB wrote:see if the update cleaned out your hosts file.
8)


Jon, thank you for reply but
hosts file has not changed after the update.
supervova
 
Posts: 7
Joined: 15. October 2011 10:11

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby supervova » 16. October 2011 17:58

JonB wrote:see if the update cleaned out your hosts file.


I also think that the problem in hosts file. But I do not know how to solve it. When I use Disk Utility Repair Disk Permissions Feature it says
ACL found but not expected on private/etc/hosts. Repaired private/etc/hosts

But when I launch process again, nothing has change.
Image

Any suggestions? Pls
supervova
 
Posts: 7
Joined: 15. October 2011 10:11

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby JonB » 17. October 2011 03:19

I'm not a Mac 'expert' but I have supported Mac's and owned them, and they are basically Unix boxes.

First - I think the reason that the 'fix' doesn't work is that it believes things are in the proper condition. The ACL entries it found are probably what enabled MAMMP to work (just a guess)

It 'looks like' the hosts file is inaccessible to XAMPP/MAMPP. So the system is unable to find those 'redirections' that the hosts file provides. (that about what I thought first, albeit for a different reason) I don't know enough about default groups/users permissions on Mac's to be a lot of help - but these might be useful -

http://hints.macworld.com/article.php?s ... 6100223537

http://foundationphp.com/tutorials/vhosts_leopard.php

You might try a Mac experts forum if you haven't so far.

If those don't get you back on track, I have an idea for you - This is based on my working premise that your update (in some fashion) made it so the Mac OS is unaware that XAMPP/MAMPP (application) needs access to the HOSTS file. Read - reset its permissions and/or ownership

Why not back everything up 'the right way' (MySQL exports where needed), Uninstall MAMPP. Reboot. Re-install MAMPP - put everything back and Import databases.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby supervova » 17. October 2011 08:29

Thanks, Jon. You are right about MAMP. It was my attempt to solve the problem after XAMPP re-install has not helped. Thanks for links and advices. Today I'll continue experimenting.
supervova
 
Posts: 7
Joined: 15. October 2011 10:11

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby JonB » 17. October 2011 13:58

Good Luck and keep us posted, its very likely others will run into the same problem.

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mac OS 10.7.2. My virtual hosts stopped working after up

Postby supervova » 18. October 2011 06:14

JonB wrote:Good Luck and keep us posted, its very likely others will run into the same problem.


Sorry, I got a huge Photoshop job yesterday, which I will do before Nov. 10. And only after that time I'll be to continue to restore local environment. I'd be grateful to all the new suggestions and advices.
supervova
 
Posts: 7
Joined: 15. October 2011 10:11

SOLUTION

Postby supervova » 19. October 2011 23:22

Despite my busy schedule, I continued to look for a solution.
It turns out that the problem with the hosts file appeared for some Mac users a few years ago. The solution I found here:
http://www.justincarmony.com/blog/2011/07/27/mac-os-x-lion-etc-hosts-bugs-and-dns-resolution/
You must install and configure DNSMasq DNS server.
Thanks, Justin
supervova
 
Posts: 7
Joined: 15. October 2011 10:11

Re: Solved. OSX 10.7.2. Virtual hosts stopped working after

Postby Sharley » 19. October 2011 23:30

Thanks for the feedback, much appreciated. 8)

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for macOS

Who is online

Users browsing this forum: Nobbie and 17 guests