Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to define a variable in apache httpd conf

Featured Replies

47

I just got real tired of seeing errors from apache about no server path found.

I set and reset paths in my computer, even edited reg, and went through every darn file

in all libs. so in flustration i set my own and so far it works

Quick setup is using the existing variable that apache can't find in HTTP.CONF

at the top add

<IfDefine US_ROOTF>
Define US_ROOTF C:/PATH **The path i want the variable for**
</IfDefine>
<IfDefine !US_ROOTF>
Define US_ROOTF C:/PATH **The path i want the variable for**
# Define SSL
</IfDefine>

Thats it//

NOW TEST it safely using httpd_z.exe -t -D DUMP_RUN_CFG

 

Apache2.4 I researched it out and here is what worked for me.
and tested using httpd_z.exe -t -D DUMP_RUN_CFG


RESULTS:::
ServerRoot: "C:/path/core/apache2"
Main DocumentRoot: "C:/path/apache/htdocs"
Main ErrorLog: "C:/path/core/apache2/logs/error.log"
Mutex rewrite-map: using_defaults
Mutex default: dir="C:/path/core/apache2/logs/" mechanism=default
PidFile: "C:/path/core/apache2/logs/httpd.pid"
Define: DUMP_RUN_CFG
Define: US_ROOTF=C:/path **THIS IS THE ROOT PATH VARIABLE I JUST MADE**
Define: php54


#<IfDefine TEST>
# Define servername test.example.com
#</IfDefine>
#<IfDefine !TEST>
# Define servername www.example.com
# Define SSL
#</IfDefine>
#DocumentRoot /var/www/${servername}/htdocs
<IfDefine US_ROOTF>
Define US_ROOTF C:/PATH **The path i want the variable for**
</IfDefine>
<IfDefine !US_ROOTF>
Define US_ROOTF C:/PATH **The path i want the variable for**
# Define SSL
</IfDefine>
#DocumentRoot /var/www/${servername}/htdocs OPTIONS ON HOW TO USE

EXAMPLE of use
ServerRoot = ${US_ROOTF}
<IfDefine php54>
LoadFile "${US_ROOTF}/core/php54/icudt53.dll"
PHPIniDir "${US_ROOTF}/core/php54/php_production.ini"

An interesting post just wondering if this is a solution to a real problem!
“I just got real tired of seeing errors from apache about no server path found.” Is this issue reproducible if so please provide details.

Your method above uses absolute paths for example Define US_ROOTF C:/PATH this forces Uniform Server to become a fixed installation probably not what you want. This conflicts with Uniform Server design see below.

Uniform server is primarily designed for portability meaning you can run the server from any location on a hard drive or from a USB memory stick. To achieve this all environments variables are set at run time by UniController. Apache reads these environment variables and makes the appropriate substitution for example ServerRoot "${US_ROOTF}/core/apache2"

A fixed installation is required only when running servers as a service. You move servers to the desired fixed location and using the service module install servers as a service. Configuration backups are created and all occurrences of environments variables in all current configuration files are replaced by absolute paths.

All the best
Ric

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.