Introduction

Web server under Windows

Important Under Windows, most web servers open the files of pages to be viewed in an exclusive reading mode. This means that while providing a page to a web browser the corresponding page cannot be changed or replaced on the file system of the web server. Therefore, check whether this problem occurs prior to using this deployment method on Windows servers.

  1. Login as administrator on the web server.
  2. Download setup.exe at http://cygwin.com and start it.
  3. Enter, e.g., c:\cygwin as the installation target directory and leave the default options “Install for all Users” and “Text File Type Unix” unchanged.  Choose for example c:\cygwin\cache as the “Local Package Directory”.
  4. Upon a request for packages to be installed, retain the default setting and additionally select the packages “openssh” and “rsync” in the “Net” category for installation. Change the arrow icons, on the left next to the package name, from “Skip” to the version number (by clicking). Other required packages are thus automatically selected.
  5. Installation is completed after clicking to the next window.
  6. Finally, call the Cygwin shell via the Cygwin icon on the desktop or via the start menu. If, depending on the Windows system, you are prompted to update /etc/group and /etc/passwd, confirm update and follow the instructions. Subsequently exit the shell by entering “exit”, call it again and leave it open. A prompt regarding /etc/passwd should not appear.
  7. Enter ssh-host-config in the Cygwin shell and answer the parameter query as follows:
    • Overwrite existing /etc/ssh_config_file?                   Yes
    • Overwrite existing /etc/sshd_config_file?                 Yes
    • Create local user sshd_server?                                Yes
    • Should privilege separation be used?                       No
    • Do you want install sshd as service?                        Yes
    • Value for environment variable CYGWIN=?            ntsec tty
  8. Start the system service "“CYGWIN sshd”” via the Windows administration.
  9. Create a local “"web”” user account which receives write permissions in the document directory of the web server.
  10. Update the Cygwin user database by entering the following command in the Cygwin shell: 
          mkpasswd -l > /etc/passwd  
          mkgroup -l > /etc/group      
  11. Check login via ssh at the “web” user account (with password) via another computer (Unix or Windows). Make sure that the ssh client uses the ssh protocol 2. Under Windows, it is possible to use the ssh client putty.exe.
  12. Enter the following during login under the “web” user account to enable ssh login via a key pair: ssh-user-config
    (Answer the prompt for generating the identity files with "no”.)

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.5 | Data privacy