Running Cortex API & Cortex Studiooutside of Eclipse
Running Cortex API & Cortex Studiooutside of Eclipse
You can run Cortex Studio and the Cortex API outside of Eclipse by using a local Apache proxy server.
For quick setup, we provide Apache config files pre-configured to run on your local. Any proxy works, but Apache HTTP Server is the only server we test.
- Download the Apache 2.4 win32 zip file from http://www.apachelounge.com/download/ or the win64 from http://www.apachelounge.com/download/win64/
- Extract the Apache24 folder locally to C:\Apache24
- Download the pre-configured Apache configs from here: ZIP.
- Unzip the reference configuration files [ep-cortex-proxy.conf and httpd.conf] to C:\Apache24\conf
- Start up Cortex API on port 9080: open a command line, navigate to your Cortex API web application folder (C:\repository\cortex-dce\webapp), and run the following:
mvn tomcat:run-war
- Start up Search on port 8080: open another command line, navigate to your Search web application folder (C:\repository\commerce-engine\search\ep-search-webapp), and run the following:
mvn tomcat:run-war
- Start up Cortex Studio on port 8888: open another
command line, navigate to your Cortex Studio
(C:\repository\relos\studio), and run the following:
mvn tomcat:run-war -Dmaven.tomcat.port=8888
Note: Studio Port 8888Cortex Studio starts on port 8080 by default, but so does Search. Starting Cortex Studio on port 8888 avoids port conflicts.
- Open a new command line, navigate to C:\Apache24\bin and run the following command
to run
Apache:
httpd.exe
- Open a web browser and go to http://localhost/studio
On Windows 7, often port 80 is in use by a system service. Change your apache httpd.conf to Listen on another port like 81 instead.
If you receive this error when accessing Cortex Studio, you probably need to change the X-Forwarded-Base setting. For more information, seeMultiple Proxies Connecting to Cortex API (A.K.A Getting around CORS).
This is a CORS issue. Make sure Cortex Studio's Server is set to http://localhost/cortex. In Cortex Studio, click Setup and set the Cortex Server to: http://localhost/cortex.