Using macros

From UwAmp Wiki

Jump to: navigation, search

Contents

Introduction

UwAmp uses a macro system for the configuration files, macros are automatically applied when the server is started from the UwAmp control interface.

You can use macros in all configuration files whose name contains "_source" and in the interface configuration of Apache UwAmp. Macros are replaced when the Apache server is started from UwAmp.

Macros List

{APACHEPATH}

Absolute path to the Apache folder : UwAmp\bin\apache

{DOCUMENTPATH}

Absolute path to the UwAmp www folder : UwAmp\www

{PHPPATH}

Path to the PHP version selected in the UwAmp main interface : UwAmp\bin\apache\[CURRENT VERSION]\

{PHPAPACHE2FILE}

Absolute path to dll apache 2 of the current PHP version : UwAmp\bin\php\CURRENT PHP IN UWAMP CONTROL\CURRENT apache2.dll

{PHPEXTPATH}

Absolute path to the folder containing the PHP extensions of the current version : UwAmp\bin\[CURRENT VERSION]\ext

{PHPMODULENAME}

PHP module name of the current running PHP version, php5_module for PHP 5, php6_module for PHP 6.

{APACHE_PORT}

Port number used in the interface UwAmp

{MYSQLPATH}

Absolute path to the MySQL folder : UwAmp\bin\database\mysql\

{MYSQLBINPATH}

Absolute path to the MySQL bin folder : UwAmp\bin\database\mysql\bin

{MYSQLDATAPATH}

Absolute path to the MySQL data folder : UwAmp\bin\database\mysql\data

{ONLINE_MODE}

Depending on the mode selected in the interface in the UwAmp main interface.

  • If Online mode is selected in UwAmp. Web site folder where the macro is used will be accessible to all machines on the network.

{ONLINE_MODE} be replaced by :

    Order allow,deny
    Allow from all
  • If Offline mode is selected in UwAmp. Web site folder where the macro is used will be accessible only from that specific machine and other machine on the network can't access.


{ONLINE_MODE} be replaced by :

    Order deny,allow
    Allow from 127.0.0.1 localhost