Port Forwarding

Get Linux Guest IP address in terminal using:

ip addr show

You will get something like:

eth0: inet (example)
  • From VirtualBox Menu, go to SettingsNetwork
  • Or if the VM is running, from the Toolbar Menu, go to DevicesNetworkNetwork Settings
  • Set Network Adapter to Attached to: NAT
  • Click the Port Forwarding button
  • Use the table below to find the correct IP and Port.
  • You can now access the sever from your Host machine's web browser by visiting or http://localhost:8888.
Name Protocol Host IP Host Port Guest IP Guest Port
HTTP TCP 8888 80
SSH TCP 3022 22
Django TCP 8000 8000
Rails TCP 3000 3000
webpy TCP 8080 8080

Website Setup

Apache Example

<VirtualHost *:80>
    DocumentRoot /var/www/example/public/

        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all

    ErrorLog /var/www/example/logs/error.log
    CustomLog /var/www/example/logs/access.log combined

Nginx Example

server {
    listen 80;

    root /var/www/example/public;
    index index.html index.htm index.php;

    access_log /var/log/nginx/localhost.access_log;
    error_log /var/log/nginx/localhost.error_log info;

Multiple Sites


Port: 3022
Protocol: SFTP
Logon Type: Normal