Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: Apache only works with -X



I wrote:
>This works. So then I added the User and Group statements to httpd.conf
>(copied from the other Apache), and removed the -X, and now the module is
>complaining that it can't open a file. I can get pages that don't go
>...
>Would the current directory be different running as root and as a different
>user? The module assumes it is ServerRoot, so all paths are relative to that.

My guess was right. As root the current directory was the ServerRoot, but
the User servers have / as the current directory.

Adding this line near the module start cured the problem:
   chdir(ap_server_root);

I also needed to include this header file:
   #include "http_conf_globals.h"	//For ap_server_root


Darren

---------------------------------------------------------------
Next Meeting: 10 October, 12:30 Tokyo Station Yaesu central gate
Next Nomikai: 20 November, 19:30  Tengu TokyoEkiMae 03-3275-3691
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links