Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Spinland

macrumors 6502
Original poster
Jul 16, 2011
320
1
Utica, NY, USA
Not sure exactly when this started but, to my knowlege, I haven't done anything with my web server configs in a very long time. This morming, when I went to visit one of the four sites hosted on my server, I got this:

Forbidden

You don't have permission to access / on this server.
Apache/2.2.20 (Unix) mod_ssl/2.2.20 OpenSSL/0.9.8r DAV/2 PHP/5.3.6 with Suhosin-Patch Server at golf1500.com Port 80

When I checked the server error logs, I see this:

[Mon Nov 28 10:47:27 2011] [crit] [client 208.105.236.250] (13)Permission denied: /Volumes/Server/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Now, clearly it's trying to find the site in the root folder of that drive when, for example, that site's document root should be:

/Volumes/Server/Web/Golf1500_Site

I checked the contents of 0000_any_80_golf1500.com.conf and the DocumentRoot is still correctly defined there. Again, there are four sites hosted on this server and I get the same problem with all four of them, so clearly some global configuration has gotten changed or corrupted but I'm not sure what to look for.

Please note: virtual hosting was properly set up and working on this server, and I successfully accessed two of the hosted sites as early as a week ago Friday. I've gone over the virtual hosting stuff I can find and don't see any problems.

I've also tried repairing disk permissions and verifying the system disk, no effect. If I turn off the web server I get to the default Lion Server page, and as soon as I turn the server on again all the URLs try to access root of the volume the web sites are installed on.

Still baffled.

Any ideas? :confused:

Many thanks in advance!
 

Spinland

macrumors 6502
Original poster
Jul 16, 2011
320
1
Utica, NY, USA
Another data point: if I go into Server.app and change the folder location of any of the hosted URLs to the default folder for Lion Server it resolves normally. It's when I change it back to the actual site folder on the second internal hard drive in the Mini Server that it stops at the root of the drive and looks for .htaccess instead of resolving to the actual folder. I can't repair permissions on the second drive, that option is unavailable from Disk Utility.

Anyone have an idea? Thanks!
 

Spinland

macrumors 6502
Original poster
Jul 16, 2011
320
1
Utica, NY, USA
Yes, in the correct root where the server should be looking for that file. This used to work, and I didn't change anything. Right now it's looking for .htaccess in the root folder of the drive volume, the virtual host entry should be directing to the document root and for some reason it's no longer doing that. I could always drop a second .htaccess in the volume's root folder, but that will do no good at all since there won't be a web site there to serve up.

----------

Well, more information on the issue:

To get virtual hosting going in the first place I had to resort to the hack of adding the file "0000_MoreTestingRequired.conf" to the sites folder, containing "NameVirtualHost *:80"

I've read a number of other ideas for getting that directive into play, including adding it directly to httpd.conf or uncommenting the line in that file that includes a different vhosts.conf file that has it. Neither of those seems to work at all with this web server, and here's why:

When I start up the web server with Server.app and the 0000_etc file is there, I get a warning in the log file that says "NameVirtualHost *:80 has no VirtualHosts." If I comment that line out in the hack file and try the include file method, I don't get that warning, which seems to be telling me the directive never gets read.

That I'm getting the warning is also troublesome, though, because Server.app is creating a pile of VirtualHost definitions when the web server is started up, all in the sites folder. Are those now not getting read somehow?

What is the new, current and definitive way to get virtual hosts by name working in Lion Server 10.7.2? I've googled on this massively and all the advice either doesn't work and/or contradicts other advice, and this used to be working, dangit! Why did it suddenly stop?

Doesn't anyone have a clue what is going on?

Thanks in advance!
 

Spinland

macrumors 6502
Original poster
Jul 16, 2011
320
1
Utica, NY, USA
Okay, I'm an idiot. I had the Server drive shared briefly and for security set the "everyone" permissions group to no access. Gee, guess what group the _www user falls under if you don't explicitly set their permissions in a folder tree? Sigh. Fixed the permissions on the drive root and, imagine that: it all works now.

Thanks again for trying.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.