Configuring Aptana to use an external web server [edit]

This page describes how to use Aptana with an external web server such as IIS or Apache for previewing files.

Contents

Introduction

Aptana uses the embedded Jetty web server to serve pages when you press the Run button Image:iconRun.png. This can be changed to whatever other server you like.

Instructions

This feature only currently works with items in projects. To quickly make a project out of an existing folder, see the topic Creating a project from an existing folder. Alternately, see the Advanced section.

To configure an external web server:

Basic

  1. In Aptana, choose the dropdown arrow next to the Run button Image:iconRun.png.
  2. Select Run...
  3. Under Start Action, choose Use Current Page.
  4. Under Server, choose Use external Web Server and type the url to your web server, such as http://localhost/
  5. Click Apply and then Close.
  6. Open your web server configuration tool. Create a virtual directory that points to the project on disk. Note that with the Use current page setting, it will append the relative path of the current file onto the base URL of the server. So a file located in /myproject/index.html will resolve to http://localhost/myproject/index.html. If you need the file to be at the root of your server directory, or your web server is on a different machine and there is a deployment step involved, then see the Advanced section.

Advanced

This technique is useful if:

Steps:

  1. In Aptana, click the drop-down arrow next to the Run button Image:iconRun.png.
  2. Select Run...
  3. Under Start Action, choose Specific URL and type the URL where your site will be deployed.
  4. Transfer your files to the remote server. (See Transferring Files with FTP to learn about Aptana's FTP feature).
  5. Click the Run button Image:iconRun.png, to open the specified URL open.

Related Topics