Apache httpd.conf settings can use environment variables well, solve the idea.

Source: Internet
Author: User
Apache httpd.conf settings You can use environment variables.
The little brother needs to make a PHP run environment package and write the PHP program and the environment together and then make the installation package,
However, in terms of configuration, can I ask the Apache httpd.conf settings to use environment variables? Because a
It's too much trouble for a change.

DocumentRoot "c:/console/www/"

LoadModule php5_module "C:/console/php/php5apache2_2.dll"
Phpinidir "c:/console/php"

The above c:/console can be set to an environment variable and then httpd.conf write directly to die.
How does it come true thank you


------Solution--------------------
Explore
The little brother needs to make a PHP run environment package and write the PHP program and the environment together and then make the installation package,
However, in terms of configuration, can I ask the Apache httpd.conf settings to use environment variables? Because a
It's too much trouble for a change.

DocumentRoot "c:/console/www/"

LoadModule php5_module "C:/conso ...

------Solution--------------------
Even if you are going to make the product, then you can completely pass the PHP code to modify the Apache Config.ini file is not. Modified restart Apache.
------Solution--------------------
If you are interested, you can look at Mod_perl,
This seems to be possible to customize the Apache configuration, see can embed Perl into httpd.conf

Http://perl.apache.org/docs/2.0/user/config/custom.html

Http://www.issociate.de/board/goto/1147159/Using_environment_variable_in_httpd.conf.htm

I don't know about this, you can ask in the Perl version.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.