Building a small home based web site

PacketMan

Aspiring Daemon

Thanks: 139
Messages: 885

#1
So, in a short few months, this routing & switching guy will put his fishing rods away, and want to try a new project. I have no clue how to build a web site (i.e server and content) for my family use; meaning it would not be public based, but could be accessible from the Internet.

So, for those of you that have done this at home, or web sites is your bread n' butter, what FreeBSD ports do you suggest I install? I'm looking at www/nginx but I'm guessing this is just one of a few. I'd like to have authentication obviously, and ideally the web site would recognize various browsers including cell phone browsers.

No flash, but certainly HTML5 I'm guessing. Not looking for a "how to build a web site" points, that is my project to figure out (will try to get my kids involved too), but what would be a few ports needed to get my feet wet, get a web site up and running fairly easy, and of course learn a bunch of stuff along the way. I'll likely use the family Ubuntu machine to build the web pages, but a FreeBSD desktop will certainly be involved too sooner or later. Ideally the web site itself would provide the functionality of allowing itself to be modified (i.e adding and deleting content) versus me using an external tool and then uploading the changes.

Thanks again everyone.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,617
Messages: 28,158

#2
For a basic (static) web site you don't need much more than www/nginx or www/apache24 (the two most common webservers). A more dynamic web site usually involves said webserver plus www/mod_php56 and databases/mysql57-server. That will give you a FAMP (FreeBSD, Apache, MySQL, PHP) setup. You'll find lots of references on the internet about a LAMP (Linux, Apache, MySQL, PHP) which is the same thing but on Linux.
 

ekingston

Active Member

Thanks: 55
Messages: 203

#3
PacketMan, you have asked a very VERY broad question. Just as "there is more than one way to skin a cat", there is way more than one way to make a website.

First off, you need a server. You have indicated you use Ubuntu. That can work fine. So does FreeBSD (or even Windows). Your server will need to be always on (otherwise other poeple won't be able to access it).

So, step 1: Hardware. What should you use?

You could run it on your existing Ubuntu machine, in which case you might want to go to the Ubuntu forums and ask there. You could run it on some other desktop you already have. You could re-purpose an existing (or old) desktop as a dedicated server. You could buy new hardware.

Whatever you decide, based on what you are asking, I would suggest you start by running it on one of your existing desktops or a very inexpensive dedicated system. If you decide to buy "new" go cheap. A low-end Intel NUC (Zotac ZBox, or other small form factor) is more than enough for a home web server.

Step 2: Operating System.

Pick your operating system. I suggest going with one you know well. As this is the FreeBSD forum, I will assume you pick FreeBSD (but Ubuntu or Windows would work equally well).

Step 3: Web Server Software.

You mentioned nginx, that works. Other popular choices include Apache HTTPd and Lighttpd. All are available in ports.

Step 4: Content Management

You mentioned you would like the website to be updated directly as opposed to editing files and uploading them. This means some sort of content management system. there are many. Joomla is in the FreeBSD ports (wordpress is another popular choice).

Whichever one you choose will have a bunch of dependencies. In FreeBSD these will be installed automatically.

But you also said you wanted to learn HTML5 and such. Generally content management systems insulate you from the underlying structure so you don't have to learn things like HTML5, CSS, and Javascript.
 
OP
OP
PacketMan

PacketMan

Aspiring Daemon

Thanks: 139
Messages: 885

#4
Thanks again SirDice.....FAMP/LAMP ...understood; I'll start reading soon.

..and thanks for your comments too ekingston. I already have a FreeBSD server in my house; doing a few cool things. Just so you know all my machines are FreeBSD based, except one Ubuntu laptop for the wife. I only mentioned this laptop since its in a commonly located spot. And thanks for the points about in Step 4. I have lots to learn, and don't fear mistakes. :D
 

ekingston

Active Member

Thanks: 55
Messages: 203

#5
Thanks again SirDice.....FAMP/LAMP ...understood; I'll start reading soon.

..and thanks for your comments too ekingston. I already have a FreeBSD server in my house; doing a few cool things. Just so you know all my machines are FreeBSD based, except one Ubuntu laptop for the wife. I only mentioned this laptop since its in a commonly located spot. And thanks for the points about in Step 4. I have lots to learn, and don't fear mistakes. :D
If you want to learn "real web development", I suggest you don't use a content management system but built what you want yourself. SirDice's suggestion of FAMP/LAMP is the base for build it yourself (and is also the underlying tools that most content management systems are built on).

My personal (and weird by most standards) home web server set-up is Apache with HTTP-Basic Auth and WebDav enabled. The website content is a tool called "tiddlywiki". This won't help you learn much in the way of web development but it is considerably lighter weight than a full FAMP/LAMP stack.
 

ronaldlees

Aspiring Daemon

Thanks: 300
Messages: 708

#6
This is one of those topics that usually shows how people learn a system, and seem to stick with it, due to the learning curve. Natch - I do that myself. So, the Drupal guys stay with that (and evangelize for it), the Django guys evangelize - and the same goes for webservers like apache and nginx, etc. I started using Django when it was first created and used early on as a CMS for the Washington Post. It was definitely not a "quick site" build.

Recently, I wanted to do about the same thing as you. So, I picked Wordpress. Yes - it's built for rank beginners. But, even a seasoned web guy will start from scatch faster on it (since there's basically nothing to do). Most of my online stuff is already there, and I've gotten into a close-my-eyes-to-do-it easy routine. So, I'm like the other fanboys I guess. It's the most popular CMS on the planet, so the most targeted. So, if it's accessible to the general internet, then as a suggestion ... maybe not so much.

My last Wordpress project runs FreeBSD11.0 on a Pi2, with Hiawatha-webserver as the server, SQLite3 as the db, php-fpm for the php access, and of course the Wordpress app. The Pi2 also serves as the WiFi access point.

So, I guess that's FHSP (fishup?). But, my system is not accessible to outside world (unless they crack the WiFi). Anyway, have been using Hiawatha recently, and so far like it. It's the "non-cola" webserver ...
 

Trihexagonal

Daemon

Thanks: 635
Messages: 1,204

#7
No flash, but certainly HTML5 I'm guessing. Not looking for a "how to build a web site" points, that is my project to figure out (will try to get my kids involved too)...
When you're ready W3Schools is the place to learn it.

I taught myself how to write valid XHTML and CSS by hand on a text editor and is how I build mine. You can learn HTML5, SQL, PHP, ASP, JavaScript, etc.

It's fun and easy so the kids should like it, too.
 

OJ

Daemon

Thanks: 253
Messages: 1,038

#8
I use editors/ne and have many websites done with that. Even larger ones. The fact is that any editor will do the trick. Install www/apache22 ( pkg install apache22) and put this file in your /var/www directory:
Code:
<html>
  <head>
    <title>My Web Site</title>
  </head>
  <body>
<p>
Your stuff here. 
</p>
  </body>
</html>
The rest you learn as you go along. Remember that you can always look at what others are doing by using Ctrl-U in most browsers.
 

OJ

Daemon

Thanks: 253
Messages: 1,038

#9
This is one of those topics that usually shows how people learn a system
You got that right. Now I'm seeing database programming, version control, PHP, Java, and god knows what. Frankly, for someone who is starting out, to get such a grip before seeing any results is unrealistic. The guy is asking, as a beginner, for a "small home based web site", for goodness sake.
 

OJ

Daemon

Thanks: 253
Messages: 1,038

#10
Now tell me, where you got the courage, for coming-up with a primary school web page building example, which does not give any ideas of a direction how a web project might evolve.
Well what I said seems to fit the bill exactly. Suitable for someone who knows a few things but wants a web site quickly for the first time. This is where to start to "get a web site up and running fairly easily" without using an "external tool".

Not looking for a "how to build a web site" points, that is my project to figure out (will try to get my kids involved too), but what would be a few ports needed to get my feet wet, get a web site up and running fairly easy, and of course learn a bunch of stuff along the way. . . . Ideally the web site itself would provide the functionality of allowing itself to be modified (i.e adding and deleting content) versus me using an external tool and then uploading the changes.
Those were the questions. Perhaps you read it differently. :)
 
Top