Live data from Hacker News

Hand Coding A Personal Website

seogadget.com

21–30 of 55 posts

Re: Hand Coding A Personal Website

#21
post #4

Having written pages, by hand, for ages now (like 15 years or so), I recently took this to a new level. I'm now hosting my site on my own hand coded webserver and no other server in front (please don't make me explain).

That's cool. I tried setting up a linode server to host my own sites and FAIL. I'll tackle it again when I've got more time. I'd like to do this using erlang or elixir.

Re: Hand Coding A Personal Website

#22
post #2

Nice tutorial, I just disagree on two small points. First, there are very sound arguments for not using CSS preprocessors [1]. Second, for a website that you own, using ".htaccess" is discouraged for performances reasons. The Apache 2.4 docs [2] say: "You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any dir…

The .htaccess file is important for SEO. For the context of the blog (seogadget.com), it's worth noting that SEO is more important than performance.

The .htaccess is used to 301 redirect www.bennet.org to bennet.org. Important for SEO so that Google only indexes one domain instead of the domain and the subdomain. Only indexing one domain gives it a better chance of ranking higher.

Also.. do you really think the traffic and 453k of bandwidth is really going to put any strain on performance?

Re: Hand Coding A Personal Website

#23
post #2

Nice tutorial, I just disagree on two small points. First, there are very sound arguments for not using CSS preprocessors [1]. Second, for a website that you own, using ".htaccess" is discouraged for performances reasons. The Apache 2.4 docs [2] say: "You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any dir…

The .htaccess file is important for SEO. For the context of the blog (seogadget.com), it's worth noting that SEO is more important than performance. The .htaccess is used to 301 redirect www.bennet.org to bennet.org. Important for SEO so that Google only indexes one domain instead of the domain and the subdomain. Only indexing one domain gives it a better chance of ranking higher. Also.. do you really think the traff…

The .htaccess file is not required for anything. Anything that can be put into .htaccess can be put into httpd.conf or one of the virtual host confs.

Re: Hand Coding A Personal Website

#24
post #2

Nice tutorial, I just disagree on two small points. First, there are very sound arguments for not using CSS preprocessors [1]. Second, for a website that you own, using ".htaccess" is discouraged for performances reasons. The Apache 2.4 docs [2] say: "You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any dir…

How many Billions of visitors you need, until a local .htaccess slows down your Website significant ?

Very rough benchmarks running "ab" against a random page on localhost:

    with AllowOverride 215rps
    without AllowOverride 245rps
It makes a difference, but there's not enough data to conclude much.

Re: Hand Coding A Personal Website

#25

Earlier quoted context omitted.

The .htaccess file is important for SEO. For the context of the blog (seogadget.com), it's worth noting that SEO is more important than performance. The .htaccess is used to 301 redirect www.bennet.org to bennet.org. Important for SEO so that Google only indexes one domain instead of the domain and the subdomain. Only indexing one domain gives it a better chance of ranking higher. Also.. do you really think the traff…

The .htaccess file is not required for anything. Anything that can be put into .htaccess can be put into httpd.conf or one of the virtual host confs.

Agreed. However, in a shared hosting environment (which most personal sites are in), you can't edit the .conf files.

Re: Hand Coding A Personal Website

#27

Earlier quoted context omitted.

How many Billions of visitors you need, until a local .htaccess slows down your Website significant ?

Very rough benchmarks running "ab" against a random page on localhost: with AllowOverride 215rps without AllowOverride 245rps It makes a difference, but there's not enough data to conclude much.

so, what you're saying here is that if you skip the ease and convenience of .htaccess files, you can get better performance?

as in, if you get slasdotted (ha! i'm old!) your site will stay up either way as long as you're getting less than 215 rps. and it goes down either way if you're getting more than 245 rps. that's a pretty tiny window in the grand scheme of things.

yeah... i'd rather my personal site be easier to maintain.

and, as to the security of it -- if you have access to the httpd.conf file, i GUARANTEE you've got bigger holes in your own hodge-podge, whole-system security than something like an .htaccess file on which you'd have to work really hard and explicitly make insecure.

just sayin'.

Re: Hand Coding A Personal Website

#28
post #2

Nice tutorial, I just disagree on two small points. First, there are very sound arguments for not using CSS preprocessors [1]. Second, for a website that you own, using ".htaccess" is discouraged for performances reasons. The Apache 2.4 docs [2] say: "You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any dir…

He said hand coding. Not hand hosting. He's on a shared host, so good luck changing the main server config.

Re: Hand Coding A Personal Website

#29
I came to the same conclusion as the author recently, which spurred me to write a simple, no frills lightweight CMS. For those interested you can see it at https://github.com/mox1/webpy-bootstrap-blog

Personally, I think there's a middle ground somewhere between writing everything yourself and using hosted Wordpress. I want to control the HTML / CSS of the pages on my site, but I don't want to end up in a WYSIWYG environment where all the details are hidden.

Re: Hand Coding A Personal Website

#30
I was about to link this to a friend, who has been using Wordpress and expressed interest in learning more about how websites work, and then OP got into installing a local Apache server and using LESS to compile CSS, and I'm afraid it might intimidate her, since she's already hesitant about her capacity for learning this sort of thing. I'm not sure why either was brought up though. If OP is comfortable with these tools and wanted to write about his own experience, I could understand, but for the sake of a tutorial, what benefit does adding these complications, which present a risk of alienating some segment of the tutorial's audience, provide? Unless you need a back end language, you don't need to install a local Apache server; you can run html files directly from whatever folder they're stored in, and if you link with relative paths, you can transfer the whole directory to a live server and it will still work fine, and for the amount of rules a beginner will probably write for a small, personal website, using LESS is probably overkill. Furthermore, anyone who's comfortable with either of these practices would have no problem adapting them to a basic "building a website with a grid framework" tutorial, and everyone else can pick them up later, when their value becomes more apparent.

It reminds me a little of the way every Javascript tutorial I find lately seems to assume that you're running a Node.js server. Outside of maybe the HN crowd, are most people running Node servers? I doubt it. And it's almost never necessary; you don't need Node to configure routing or build some custom directives in Angular, for example, so why insist that people use it?

Post reply on HN