Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds .htaccess file #275

Closed
wants to merge 3 commits into from
Closed

Adds .htaccess file #275

wants to merge 3 commits into from

Conversation

addyosmani
Copy link
Contributor

reviewer: @sindresorhus

@sindresorhus
Copy link
Contributor

@alrra

@pierrebeaucamp
Copy link

Maybe this was already brought up sometime earlier, but is it necessary to include an apache specific configuration file? I can understand that Apache has a high market share, but in my opinion the choice of the webserver should not be determined by the website itself - web-starter-kit should run on all webservers alike.

@arthurvr
Copy link
Contributor

Does adding a htaccess file actually mean that using web starter kit on a not-apache server fails?

@alrra
Copy link
Contributor

alrra commented Jul 10, 2014

@addyosmani @sindresorhus I personally think that the usefulness of this addition is highly dependent on what audience you are targeting / you have.

The Apache server configs are still included¹ in HTML5 Boilerplate as we have a lot of users that don't know anything about servers and just go with some random hosting services, services that, in most cases, still run Apache.

¹ may change in the future (especially as we get our other server configs up to date and inline with the Apache ones).


If you decide to include the Apache server configs, I can say that they are well documented and actively maintained, being up-to-date with the latest additions and changes happening out there (e.g.: 1, 2).


Does adding a htaccess file actually mean that using web starter kit on a not-apache server fails?

@arthurvr No.

@arthurvr
Copy link
Contributor

If adding the file doesn’t break anything on not-apache servers, +1 for adding it to the repo! If users of the starter kit don’t know or don’t need the file, they can remove or just ignore it.

@sindresorhus
Copy link
Contributor

I guess the question we should be asking, is there any performance benefit of adding it? As adding it automatically means a slight perf decrease:

Using .htaccess files slows down Apache, therefore, if you have access
+# to the main server config file (usually called httpd.conf)

(no idea how much though)

If the above is negligible I guess we could add it for convenience as I know most of our users won't know anything about servers and will most likely use something Apache powered.

@alrra
Copy link
Contributor

alrra commented Jul 10, 2014

is there any performance benefit of adding it?

@sindresorhus sure, you get things such as caching, compression, etc., by default.

e.g.:

@addyosmani
Copy link
Contributor Author

I was trying to improve the performance of a WSK project yesterday that I'd just pushed to my domain. Unfortunately, despite all of the tooling we give you out of the box caching is one of those things you're somewhat left to your own devices to figure out. Just by dropping in the .htaccess file with minor reconfiguration, I was able to tick the caching box off and improve my score.

I'm 👍 on bringing back in the 404 part. I can do that if we decide to go ahead with this addition. We do want to make sure we're only adding this in if it actually helps people :)

I see there being three options for moving forward here:

  • Include .htaccess and assume that a lot of people will be using Apache-based servers.
  • Include in a web-starter-kit-extras repo where we could also capture additional server configs. If that's the case though we might end up just linking to the H5BP server configs to avoid unnecessary duplication.
  • Don't include at all and add a note to the docs about it.

@arthurvr
Copy link
Contributor

+1 for adding it to the master branch. For not-apache users, the file doesn't make any sense.

I think when we put it into another branch, a hole bunch of 'web starters' wouldn't take a look at it.

@addyosmani
Copy link
Contributor Author

@stephenplusplus @gauntface @sindresorhus @passy could we get some votes on +1/-1 for this change?

@PaulKinlan
Copy link
Contributor

@addyosmani given the trend of use for nginx, I just want to make sure that we have that on the plate too at some point.

@addyosmani
Copy link
Contributor Author

Added back the 404 advice in a commented out form. Does LG to folks?

@PaulKinlan definitely worth keeping in mind for the future.

@sindresorhus
Copy link
Contributor

@PaulKinlan can you open a ticket so we don't forget. I agree we should cover the two most popular ones. See: https://github.com/h5bp/server-configs-nginx

@pierrebeaucamp
Copy link

@PaulKinlan and @sindresorhus it doesn't make sense to include an nginx config file in WSK itself, as the config should sit somewhere else. Worst case scenario: someone makes their server config public after they just copy the repo without knowing anything about nginx.
I think a note in the docs pointing to https://github.com/h5bp/server-configs-nginx would be the safest and easiest thing to do at the moment.

@sindresorhus
Copy link
Contributor

@pierrebeaucamp yeah, I've never used Nginx before, I just assumed it had a similar configfile. Your suggestion is probably the sane thing to do indeed.

@addyosmani
Copy link
Contributor Author

Are we okay with landing this one and documenting/providing samples for nginx and other configurations outside of the main repo?

@sindresorhus sindresorhus deleted the htaccess branch July 11, 2014 21:58
@sindresorhus
Copy link
Contributor

👍 #278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants