|
![]()
|
Support sites: Documentation | Forum | Control panel | Status blog | Tickets
The WebFaction web hosting system works by keeping track of three import components of your account:
In this section of the user guide, you will learn how to assemble domain names, applications, and your files into a complete website that your visitors can reach and use.
See also
The next chapter of the user guide, Example Websites, demonstrates common use cases.
To serve content, run code, and interact with databases, you need applications. Applications are collections of directories, files, and system settings which allow media to be served and code to be executed by the web server.
For example, an application could be as simple as a Static-only application storing a handful of HTML files and some JPEG images. In contrast, however, applications can be sophisticated software tools, like a Django application or the WordPress blogging engine. You can even run a Custom app (listening on port) to use software not covered by one of WebFaction’s one-click installers.
The control panel allows you to manage applications installed on your account. You can install a wide variety of applications, including:
You can also create a custom application, which lets you listen on a specified port.
When you create an application with the control panel, a directory is created in your home directory – $HOME/webapps/<app name>, where <app name> is the application name you entered on the control panel – along with any required files, like .htaccess or included scripts. If the application is a long-running process, the control panel installer also adds a cron job which periodically restarts the process if it stops running.
Note
An application cannot be reached from outside a WebFaction server without being configured in a website entry with the control panel. You’ll learn more about configuring website entries in the Websites section.
To create an application with the control panel:
Log in to the control panel.
Click Domains / websites ‣ Applications. The > Home > Apps page appears.
Click the Add new (
) button. The> Home > Apps > Add page appears.
Enter a name for the application in the Name field.
Select an application from the App category menu.
Optional: To use a version of the application other than the latest, in the App type menu, click to select the version of the application you want to use.
Review the App doc information about the selected application.
If applicable, enter any required information in the Extra info field.
Click the Create button.
If an application or a specific verison of an application you want to use is not listed in the control panel, don’t despair. First, check out WebFaction Software Documentation, where we provide instructions for additional software packages not covered by a control panel installer. You can also install custom applications using one of the three “generic” application types:
Static/CGI/PHP: If the software you want to use can run directly from the document root directory, like many PHP software packages, use a Static/CGI/PHP application. Once you’ve installed the application, upload files to ~/webapps/static_app, where static_app is the name of the application, to get started.
Symbolic link to static/cgi/php: If the software you want to use needs only a subset of its files exposed to the web, use a Symbolic link to static/cgi/php application. In the control panel installer, enter the absolute path to the directory you want to expose to the web in the extra_info field. Otherwise, it works just like a Static/CGI/PHP application.
Custom app (listening on port): If the software you want to use listens on a network port, use a Custom app (listening on port). A Custom app assigns a specific port number where incoming traffic will be directed. Install the software, configure it to listen to the specified port, and run.
See also
If you need to repeatedly install an application not provided by the WebFaction control panel, see the WebFaction API documentation.
An application by itself isn’t particularly useful: it needs a web address—a domain name and a path—so it can be reached by a web browser. A website entry in the control panel is needed to connect an application to a domain and path.
Once you’ve configured at least one domain and one application, you can create a website record in the control panel. A website entry in the control panel connects domains to applications. A website entry works to instruct your WebFaction web server to forward requests for a specific URL path to an application and then return the application’s response.
The Life Cycle of a Request and Response
Requests to a URL path are received by a WebFaction server’s frontend process (typically an instance of the nginx web server). Such requests are proxied to a specific application’s process, such as a Django application’s instance of the Apache web server. The frontend process waits for a response from the application and forwards that response to the source of the original request.
Please see the diagram below for a closer look at how requests are received and replied to in a WebFaction server.
For example, suppose you have a Drupal application, my_drupal, and a domain, mysite.com. A website will let you configure mysite.com to point to your application, my_drupal. Then, when a visitor to your site enters http://mysite.com/, your Drupal application will load at that URL. Behind the scenes, the WebFaction web server automatically proxies requests received for mysite.com to the application stored at $HOME/webapps/my_drupal.
Hint
Creating a new site, but haven’t decided on a domain name yet? Or maybe you want to test the latest and greatest version of your site before taking it live on your existing domain name? Create subdomains of your username.webfactional.com domain to connect to your applications instead (like testsite.username.webfactional.com). See Adding a Domain to the Control Panel for more information.
Websites permit much more sophisticated configurations, however. You can configure a specific path (or mount point) at a domain to point to an application, allowing you to run multiple applications under a single domain. For example, suppose you have a pair of applications, a Drupal application called my_drupal and a Static/PHP/CGI application containing phpBB called forum, and a domain, mysite.com. You can configure a website to serve my_drupal from the root path (/) of mysite.com and forum from /forum:
mysite.com
/ -> my_drupal
/forum -> forum
Domain and path combinations and applications may have a many-to-one relationship. While a particular domain and path combination can only point to one application, numerous domain and path combinations can point to the same application.
To create a Website record with the control panel:
Log in to the control panel.
Click > Domains / websites ‣ Websites.
Click the Add new button. The > Home > Sites > Add page appears.
Enter a website name in the Name field.
If applicable, click to select an IP address where this site will be reached from the Ip menu.
If you want your site to reachable over a secure HTTPS connection, click to select Https.
Click to select the domains which correspond to this website record from the Subdomains field. Hold Ctrl or Cmd to select multiple domains.
Add as many applications as desired:
Click the Add new button. An App and URL path field appear.
![]()
Click to select an application from the App menu.
Enter a path in the URL path field.
Click the Create button.
As soon as the changes take effect, you can access each application at the URLs specified in the URL path field.
Note
Changes to website entries can take up to two minutes to take effect. If at first a new or modified website is not working as expected, please wait at least two minutes and try again.
You can configure a website record to use HTTPS, an encrypted alternative to a normal HTTP connection.
Note
The HTTPS setting is either on or off. Connections will only be accepted for that website entry over the protocol specified. If you need your site to be available over HTTP and HTTPS you will need to create two website records.
By default, HTTPS websites use WebFaction’s security certificate. On some browsers, this can result in an alert to users that your domain does not match the security certificate. If you would like to use your own certificate, you will need to purchase the certificate through a certificate authority. You will also need to add a dedicated IP address to your account; please open a ticket with WebFaction support for details.
If you already have your own certificate, please upload your certificate and key files to your home directory. Then, open a support ticket to request that the certificate be enabled.
If you are purchasing your own security certificate, you will be asked to provide a Certificate Signing Request (CSR). To generate a CSR: