Skip to content

Instantly share code, notes, and snippets.

@AJLoveChina
Last active October 8, 2016 11:55
Show Gist options
  • Save AJLoveChina/49502695e8ab6b4d7607ec5e50a11875 to your computer and use it in GitHub Desktop.
Save AJLoveChina/49502695e8ab6b4d7607ec5e50a11875 to your computer and use it in GitHub Desktop.
Tomcat Proxy Configuration

My Tomcat is 7.0 on Windows7 64bit.

Steps :

  1. Go To Tomcat installed directory and open /bin directory
  2. Open catalina.bat with notepad, and add SET "JAVA_OPTS=%JAVA_OPTS% -Dhttp.proxyHost=Your Personal Host -Dhttp.proxyPort=Your Personal Port" , remember replacing the host and port as your own.
  3. OK!

such as :

if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
set LOGGING_CONFIG=-Dnop
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuliConfig
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"
SET "JAVA_OPTS=%JAVA_OPTS% -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=9999"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment