Re: httpd fails after boot

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

 



2009/7/23 Mike -- EMAIL IGNORED <m_d_berger_1900@xxxxxxxxx>:
> On Thu, 23 Jul 2009 20:38:45 +0100, Sharpe, Sam J wrote:
>
> [...]
>>> I just examined the Rewrite log and I found that it does not recognize
>>> the environment variable.  I have S85httpd at levels 3 and 5.  Where do
>>> the environment variables /etc/bashrc get set?
>>
>> I don't think they ever do.
>>
>> I believe that on boot, the commands are not run as /etc/init.d/blah,
>> they are run as "/sbin/service start blah" - and that's why your
>> environment variables don't work. From 'man service':
>>
>> DESCRIPTION
>>        service  runs  a  System V init script in as predictable
>>        environment as possible, removing most environment variables and
>>        with current  working directory set to /.
>>
>> --
>> Sam
>
> Then I could imagine adding to .bashrc some lines that
> scan httpd.config for RewriteRule lines that set environment
> variables and export them from .bashrc .  Seems like a
> hard way to do things.  Any better suggestions?

If you look at /etc/init.d/httpd, you will see:

if [ -f /etc/sysconfig/httpd ]; then
        . /etc/sysconfig/httpd
fi

So the initialisation script sources that file. If you want to set
Environment variables that are available when Apache starts, it would
make sense to try adding those variables to /etc/sysconfig/httpd - it
might do what you want for minimal effort...

-- 
Sam

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux