directory
directory

Reputation: 3167

Can't get my Vhosts back running after Mac OS X Lion upgrade

After upgrading my MacBook Pro to Mac OS X Lion I am not able anymore to get my 'Zend Server' running like before. At first the 'Zend Server' gave me servile errors by starting it from the command line. I fix this by doing a complete new installation of Zend Server.

After this new installation Zend Server runs fine and no problems at all. So now I want to put back my zend projects. I made a backup of my vhost file and put it back, it seems to be Lion didn't touch my host file so I didn't touch either (just checked). I did the follow things;

  1. Put one of my vhosts back in conf/extra/httpd-vhosts.conf (just one to check).
  2. Uncomment the vhost include in conf/httpd.conf
  3. Checked my host file
  4. Restart zend server from command line

After this I still cant reach the project by browsing to http://foo.localhost:10088/

Vhosts

<VirtualHost *:10088>
ServerAdmin [email protected]
SetEnv APPLICATION_ENV "development"
DocumentRoot "/Users/nicky/Zend/workspaces/DefaultWorkspace7/foo/public"
ServerName foo.localhost
ErrorLog "/Users/nicky/Zend/workspaces/foo-log"
CustomLog "/Users/nicky/Zend/workspaces/foo-log" common
</VirtualHost>

Hosts

127.0.0.1 localhost
127.0.0.1 dummy-host.example.com
127.0.0.1 dummy-host2.example.com
127.0.0.1 foo.localhost

I am not sure if this can have effect on the problem, but by restarting zend from the command line, i get the follow:

MacBook-Pro-van-Nicky-Klaasse:~ nickyklaasse$ sudo /usr/local/zend/bin/zendctl.sh 
restarthttpd: Could not reliably determine the server's fully qualified domain name, 
using MacBook-Pro-van-Nicky-Klaasse.local for ServerName

Regards, Nicky

Upvotes: 0

Views: 609

Answers (1)

Gabriel Cartier
Gabriel Cartier

Reputation: 11

I've had similar problems as well with that. I've been searching around for an answer, found some solutions but none of them seemed to work.

The only thing that finally made it working (not even sure how it actually helped), is going into system preferences -> sharing and enabling web sharing. That is normally starting your apache2 server but I wasn't using the default one, I am running another apache2 process with a different httpd configuration. Anyway, after starting it and stopping it (from the system preferences window), it seemed like it was working.

One thing that could be useful is checking your error_log as well as the access_log in /var/log/apache2/. Check the access_log to see what is the address trying to be resolved. At first, whenever I was making a request on my website through the Virtual Host, in my access log I only had 127.0.0.1 which is incorrect. After it worked, I can see that the requests are www.example.com and not the localhost, showing that the virtual host is indeed working.

Not sure if that will help you, give it a try, paste the access_log and error_log latest lines to see where there could be a problem.

Upvotes: 1

Related Questions