linux web hosting

Web files for the primary domain belong in the /usr/local/apache/htdocs directory. Web files for virtual hosts (subhosts) belong in the associated user’s /home/username/www/subhostdomain.name directory. Remember, /www is a symbolic link (shortcut) to /usr/local/apache. 

    1. Connect to your VPS v2 Virtual Server using SSH and type:
      % cd /home/enetrics/www/enetrics.com
      or
      % cd /home/username/www/subhostdomain.name
    2. Organize your Web files into different directories using the mkdir command. For example, if you want to store all product information on your Web site under one directory, create a “products” directory.
      % mkdir products

Note: Do not use spaces in filenames as these cause problems in UNIX. Use the underscore character "_" in place of spaces.

Common File Uploading Methods

The more common methods of uploading files to your server are using ftp in the command line, using an FTP client program, using iManager, and using Windows File Sharing.

Uploading Files with Command-Line FTP

The following example uses FTP commands to upload a file.
    1. From the Windows taskbar, click Start, Run.
    2. Type ftp your_company.com, and click OK.
    3. Type your username and password when prompted.

The following is a sample FTP session:

cd /www/subhostdomain.name
ascii
lcd c:\upload local directory containing the file
put filename
bin
put logo.gif
quit

See “Using Command Line FTP” for more information.

Uploading Files with a graphical FTP Program

This sample FTP session illustrates a typical file transfer.
    1. Open the FTP program and enter the requested information:
      • Virtual Server ID (IP or hostname)
      • Username and password
      • Binary, Ascii, or Auto
    2. Double click www in right window; /usr/local/apache appears.
    3. Go to the destination directory.
    4. Drag-and-drop files between your local computer and your VPS v2 Virtual Server.

 

Uploading Files with iManager

This sample iManager session illustrates a typical file transfer.

    1. Open iManager.
    2. Type your login name and password.
    3. Click File Manager.
    4. Select /usr/local/apache/subhostdomain.name.
    5. Click Upload File.
    6. Click Browse.
    7. Select the file from the local machine that you want to upload.
    8. Click Upload File.

Uploading Files with Windows File Sharing

Windows® File Sharing is a nice interface for maintaining your Web site. Using it requires that you install the Samba server on your VPS v2 Virtual Server. To do this:

  1. Connect to your VPS v2 Virtual Server using SSH and type:
    # vinstall samba
  2. Answer the questions in the script that appears.
    installing samba
    Do you want to use SWAT to configure Samba? y
    Generating a SSL keyfile for stunnel protection of the
    SWAT configuration interface. You will be prompted for
    Iinformation to be embeded in the key.
    Using configuration from /usr/local/etc/stunnel/stunnel.cnf
    Generating a 1024 bit RSA private key
    ++++++++++++
    writing new private key to '/usr/local/etc/stunnel/stunnel.pem'
    You are about to be asked to enter information that will be incorporated into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank. For some fields there will be a default value. If you enter '.', the field will be left blank.
    Country Name (2 letter code) [PL]:US
    State or Province Name (full name) [Some-State]:ID
    Locality Name (eg, city) []:Silver City
    Organization Name (eg, company) [Stunnel Developers Ltd]:XYZ
    Organizational Unit Name (eg, section) []:Product Development
    Common Name (FQDN of your server) [localhost]:     
    To customize the settings samba is using, you can acces the SWAT configuration
    interface at: https://v2test16.tempdomainname.com:901/
    Samba is installed and running.
    An account will be denied the ability to login via samba until smbpasswd is run for that user. To find out more please run man smbpasswd.
    vinstall done
  3. Type logout.
  4. Reconnect to your VPS v2 Virtual Server to refresh the executable paths.
  5. Type smbpasswd to create a password. Type the password twice.
    When run by root, use:
    smbpasswd [ options ]  [ username ]  [ password ]
    otherwise:   smbpasswd [ options ]  [ password ]
    The “password changed” message appears.


Mapping your VPS v2 Virtual Server's home directory (Windows desktop) over the Internet

Other versions of Microsoft Windows OSs might require additional steps.

Windows 98
    1. Set the Primary Network Login to Client for Microsoft Networks.
    2. From the TCP/IP Properties panel, under DNS Configuration, type your virtual server’s domain name in the Domain Suffix Search Order. (This assumes that DNS is enabled.)
    3. In the Enter Network Password login prompt, type your VPS v2 Virtual Server’s username and password.
    4. From your Windows taskbar, click Start, Find Computer.
    5. In the Find Computer dialog box, in the Named field, type www.
    6. Click Find Now.
    7. Double-click the www icon. This action displays a single folder. This folder is in your home directory on your VPS v2 Virtual Server.
      Right-click the folder and choose Map Network Drive.

Windows 2000

    1. From your Windows taskbar, click Start, Run, and Control Panel.
    2. Double-click Administrative Tools, Local Security Policy.
    3. Double-click Local Policies, Security Options on the right panel.
    4. Double-click Send unencrypted password to connect to third-party SMB servers.
    5. Click Enable, OK.
    6. Close the Local Security Settings window.
    7. Using Notepad, edit the lmhosts.sam file located in the C:\WINNT\system32\drivers\etc directory.
    8. Add the following line to the file:
xxx.xxx.xxx.xxx      your_company.com
where xxx.xxx.xxx.xxx is your IP address, and your_company.com is your domain name.
Save and close the lmhosts.sam file.
    1. Double-click My Computer.
    2. Click Tools, Map Network Drive.
    3. Choose an empty drive letter from the drive text box.
    4. Type the following in the folder text box:

      \\your_company.com\login.
      Replace your_company.com with your domain name and login with your VPS v2 Virtual Server username.
    5. Click Different user name.
    6. Type your login name and password, and click OK.
    7. Click Finish. A new drive with the selected letter appears in My Computer with the letter chosen earlier.
After you have mapped your VPS v2 Virtual Server's home directory, simply drag and drop files to your VPS v2 Virtual Server. Using this feature, you can delete, copy, and move files on your VPS v2 Virtual Server as if it were a local drive.
See Appendix B, “Creating Content for the World Wide Web” for information on HTML and Web site development.
Hosting  ::  Web Design  :: Server Administration  ::  Tech Support  ::  Contacts
Data Centers  ::  Tier I Global IP Network  ::  SLA/Contracts  ::  Search  ::  Account Login