Skip to content

luisiestrada/static-web-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Web Server

Multithreaded static web server written in Ruby, which was developed to learn about the HTTP protocol and the underpinnings of the Ruby on Rails framework.

Creating a connection through sockets, the server reads and parses HTTP requests from a client, performs a series of operations, and returns an HTTP response with the appropriate status code and resource (if applicable).

Responds to local HTTP requests with status codes 200, 201, 204, 400, 401, 403, 404, and 500.

Getting Started

In order to run the web server, you'll have to modify the filepaths within the httpd.conf and .htaccess files to match your directory structure.

Within the rubyserver/ directory, run the server using:

ruby server.rb

Then in a browser enter:

localhost:port/file_path

Where port is an arbitrarily chosen port number specified within the httpd.conf file, and file_path is a file or directory within the server's filesystem, e.g. chomp.gif.

To access files within the protected directory, use these credentials:

username: luis
password: estrada

Technologies:

  • Ruby, HTML
  • Tools: Git, GitHub

See more:

Known issues:
  • Doesn't work well with the Chromium browser on Ubuntu (use Mozilla Firefox instead).

About

Static web server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 71.0%
  • HTML 27.2%
  • Shell 1.1%
  • Perl 0.7%