logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache 2.0 wrote ErrorLog file in VirtualStore but not 2.4
Author
goozak



Joined: 30 Jan 2015
Posts: 3
Location: Canada, Montreal

PostPosted: Fri 30 Jan '15 19:39    Post subject: Apache 2.0 wrote ErrorLog file in VirtualStore but not 2.4 Reply with quote

We use Apache as part of a 'consumer' software which as been working fine with Apache 2.0.64 (running as a 'regular' user). We want to transition to version 2.4, but it seems to be working a little bit differently than the 2.0 version.

In httpd.conf, we have "ErrorLog logs/error.log". With version 2.0, the error.log file is created in the "...\AppData\Local\VirtualStore\..." path (since user cannot write to 'Program Files (x86)' were it is installed), but with version 2.4.10 we only get an "Access is denied. AH00015: Unable to open logs" error.

Is this a known difference between 2.0 and 2.4 or is there some other setting that I'm missing to make this work?

Bruno G.
Smile
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 30 Jan '15 21:19    Post subject: Reply with quote

I've only seen the Can't open logs error when there is already an instance of Apache running. So make sure there is none.

Writing to the virtualstore is done by Windows and Apache has no control over that.
Back to top
goozak



Joined: 30 Jan 2015
Posts: 3
Location: Canada, Montreal

PostPosted: Mon 02 Feb '15 16:22    Post subject: Reply with quote

Actually, the full error I get is this :
Quote:
(OS 5)Access is denied. : AH00091: httpd.exe: could not open error log file C:/Program Files (x86)/InstallPath/apache24/logs/error.log.
AH00015: Unable to open logs

There is no other Apache running. If I start CMD as an Administrator, then it works. But with our Apache 2.0, it works without being Admin (on the same machine).

That's why I'm thinking it has to do with the Apache build we're using (our 2.4 is from Apache Lounge, not sure about our 2.0 [before my time]) or with something in the config file.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 02 Feb '15 19:38    Post subject: Reply with quote

I'd guess the same and I'm thinking it's probably correct. The added security to Program Files in Vista and upward is problematic. Why this difference in behavior between 2.0 and 2.4 I do not know.

Apache running as a windows service should not have this problem since by default the service runs under the SYSTEM account.

If you do not want Apache running as a service then why not just configure Apache to put them in the users Documents folder. HOMEPATH is one of two environment variables in both my Vista x86 and Win7 x64 that points to C:\Users\Username, I'll assume it's in my Win8.1 as well.

Code:
ErrorLog "${HOMEPATH}/Documents/apache-error.log"
CustomLog "${HOMEPATH}/Documents/apache-access.log" common


The PID file is temporary so simply stuff it in TEMP. By default Apache will write this file to it's logs folder causing the same problem.

Code:
PidFile ${TEMP}/apache.pid


It would then be located in C:\Users\Username\AppData\Local\Temp

To me these sound better than buried in the VirtualStore anyway.
Back to top
goozak



Joined: 30 Jan 2015
Posts: 3
Location: Canada, Montreal

PostPosted: Tue 03 Feb '15 1:11    Post subject: Reply with quote

Thanks for your help !

I was hoping that there was something obvious I was missing so we could keep our setup the same. I guess we'll try to go the better way and adjust the path & access right. Smile
Back to top


Reply to topic   Topic: Apache 2.0 wrote ErrorLog file in VirtualStore but not 2.4 View previous topic :: View next topic
Post new topic   Forum Index -> Apache