Show TOC

Specifying a Password for the Proxy ServerLocate this document in the navigation structure


The TREX preprocessor is responsible for preparing documents to be indexed by the TREX engines. The application using TREX (for example, Content Management in SAP Enterprise Portal) transfers documents to be indexed to the preprocessor in the form of URIs that reference the storage location of the documents. The preprocessor resolves these URIs and then collects the actual documents using a Web server and HTTP.

If you want to index documents that can only be accessed using a proxy server, you have to register the proxy server with the TREX preprocessor. You specified settings for the proxy server when you installed TREX. For more information on changing these settings later on, see Changing the Proxy Server Settings.

If the proxy server is protected by a password for the proxy user, you can register the password with the TREX preprocessor. The password is then automatically sent to the preprocessor along with the user identification when each preprocessor request takes place. This authenticates the preprocessor with the proxy server.

You can specify the password for the proxy user during the TREX installation. You can use a Python script to change the password in the TREXPreprocessor.ini configuration file later on or to define a password if you did not specify one during the installation. Passwords and user names are stored and transmitted in encrypted form.

Starting the Python Script

The procedure for starting the Python script differs depending on whether you are using UNIX or Windows. However, the command syntax is the same on both operating systems.


  1. Log on with the <sapsid>adm user.
  2. Go to the TREX directory.

    cd /usr/sap/<sapsid>/TRX<instance_number>

  3. Set the environment variables required by TREX by executing one of the following scripts.
    • Bourne shell sh, Bourne-again shell bash, Korn shell ksh:


    • C Shell csh:

      source TREXSettings.csh

  4. Go to the directory in which the Python script is located and execute it:

    cd python_support

    python <python_script>.py


  1. Log on with the <sapsid>adm user.
  2. Open a test console by choosing Start Programs or All Programs → SAP TREX → Instance <instance_number> → Tools → TREX_<instance_number> Console.

    Always use a test console when executing Python scripts. The correct environment variables are set in the test console.

    You can find them in the <disk_drive>:\usr\sap\<SAPSID>\TRX<instance_number>\exe\python_support directory.

  3. Execute the Python script:


Specifying a New Password

  • You set a new password for the proxy server by entering the following: --iniFile=TREXPreprocessor.ini --section=httpclient --entry=proxypassword <Password>

Deleting the Existing Password

  • You delete the existing password for the proxy server by entering the following: --iniFile=TREXPreprocessor.ini --section=httpclient --entry=proxypassword --clear <Password>

Changing an Existing Password

  • You change the existing password for the proxy server by entering the following: --iniFile=TREXPreprocessor.ini --section=httpclient --entry=proxypassword --update <newPassword>

Stopping and Starting the TREX Preprocessor

  • You have to stop and restart the TREX preprocessor so that it recognizes the changes made in the configuration file TREXPreprocessor.ini. You do this with the TREX admin tool (standalone), using the function for starting and stopping the TREX servers. Note that the TREX daemon automatically restarts the server after it has been stopped.