Skip to content

Commit

Permalink
Docs: Add more info regarding servers and stacks
Browse files Browse the repository at this point in the history
Ref: h5bp#1572
Close: h5bp#1572
  • Loading branch information
QWp6t authored and alrra committed Sep 10, 2014
1 parent a44c533 commit 93c3ec4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 15 deletions.
26 changes: 15 additions & 11 deletions src/doc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,27 @@ It is because of the use of [protocol-relative
URLs](http://paulirish.com/2010/the-protocol-relative-url/).

**N.B.** If you try to view the local web page directly in the browser, the
browser will fail to load the assets specified using protocol-relative URLs as
it will attempt to fetch them from the local file system. We recommend you use
a local server to test your web pages, or a file hosting service that allows
you to preview your web pages online (e.g. [Dropbox](https://www.dropbox.com/)).
browser will fail to load the assets specified using protocol-relative URLs
as it will attempt to fetch them from the local file system. We recommend you
use a local HTTP server to test your web pages, or a file hosting service that
allows you to preview your web pages online (e.g.
[Dropbox](https://www.dropbox.com/)).

Setting up a local server can be done using:
Setting up a local HTTP server can be done using there various
[one-liners](https://gist.github.com/willurd/5720255):

* PHP 5.4.0+ by running
[`php -S localhost:<port_number>`](http://php.net/manual/en/features.commandline.webserver.php)
[`php -S localhost:8080`](http://php.net/manual/en/features.commandline.webserver.php)
from your local directory
* Python 2.x by running `python -m SimpleHTTPServer` from your local directory
* Python 3.x by running `python -m http.server` from your local directory
* Ruby by installing and running [asdf](https://rubygems.org/gems/asdf)
* [LAMP](http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29),
[MAMP](http://www.mamp.info/en/index.html),
[WAMP](http://www.wampserver.com/en/), or
[XAMPP](http://www.apachefriends.org/index.html)
* Ruby 1.9.2+ by running `ruby -run -ehttpd . -p8080` from your local directory
* Node.js by installing and running either
[`static -p 8080`](https://www.npmjs.org/package/node-static)
or [`http-server -p 8080`](https://www.npmjs.org/package/http-server)

A list of more complex HTTP servers can be found
[here](misc.md#servers-and-stacks).


### Why don't you automatically load the latest version of jQuery from the Google CDN?
Expand Down
37 changes: 33 additions & 4 deletions src/doc/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ table of contents](TOC.md)

* [.gitignore](#gitignore)
* [.editorconfig](#editorconfig)
* [.htaccess](#htaccess)
* [Server Configuration](#server-configuration)
* [crossdomain.xml](#crossdomainxml)

--
Expand Down Expand Up @@ -57,10 +57,39 @@ For more details, please refer to the [EditorConfig
project](http://editorconfig.org/).


## Server Configuration

H5BP includes a [`.htaccess`](#htaccess) file for the Apache HTTP server. If you are not using
Apache as your web server, then you are encouraged to download a
[server configuration](https://github.com/h5bp/server-configs) that corresponds
to your web server and environment.


### Servers and Stacks

A comprehensive list of web servers and stacks are beyond the scope of this
documentation, but some common ones include:

* [Apache HTTP Server](http://httpd.apache.org/docs/trunk/getting-started.html)
* [LAMP](http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29)
(Linux, Apache, MySQL, and PHP).
Other variants include [MAMP](http://www.mamp.info/en/index.html),
[WAMP](http://www.wampserver.com/en/),
or [XAMPP](http://www.apachefriends.org/index.html).
* LAPP uses PostgreSQL instead of MySQL
* [Nginx](http://wiki.nginx.org/GettingStarted)
* [LEMP](http://www.chrisjohnston.org/ubuntu-tutorials/setting-up-a-lemp-stack-ubuntu-904)
is similar to the LAMP stack but uses Nginx
* [IIS](http://en.wikipedia.org/wiki/Internet_Information_Services)
* [ASP.NET](http://www.asp.net/get-started)
* [MEAN](http://mean.io/) (MongoDB, Express, AngularJS, Node.js)


### .htaccess

A `.htaccess` (hypertext access) file is a Apache HTTP server configuration
file. The `.htaccess` file is mostly used for:
A `.htaccess` (hypertext access) file is a
[Apache HTTP server configuration file](https://github.com/h5bp/server-configs-apache).
The `.htaccess` file is mostly used for:

* Rewriting URLs
* Controlling cache
Expand Down Expand Up @@ -103,7 +132,7 @@ Notice that the original repo for the `.htaccess` file is [this
one](https://github.com/h5bp/server-configs-apache/blob/master/src/.htaccess).


### crossdomain.xml
## crossdomain.xml

The _cross-domain policy file_ is an XML document that gives a web client —
such as Adobe Flash Player, Adobe Reader, etc. — permission to handle data
Expand Down

0 comments on commit 93c3ec4

Please sign in to comment.