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 . 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
- In Aptana, choose the dropdown arrow next to the Run button
.
- Select Run...
- Under Start Action, choose Use Current Page.
- Under Server, choose Use external Web Server and type the url to your web server, such as http://localhost/
- Click Apply and then Close.
- 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:
- The web site is on another machine.
- You are not using projects.
- You can't have your site as a subdirectory under your local web server address (i.e. it has to be at http://localhost/index.html).
Steps:
- In Aptana, click the drop-down arrow next to the Run button
.
- Select Run...
- Under Start Action, choose Specific URL and type the URL where your site will be deployed.
- Transfer your files to the remote server. (See Transferring Files with FTP to learn about Aptana's FTP feature).
- Click the Run button
, to open the specified URL open.