# Which HTTPd should I install ?



## mikey777 (May 10, 2020)

I realize this sounds too general, maybe simple, but I'm new to FreeBSD and am learning fast. I'd like somethign fast, easy, and not complicated, sort of like IIS on XP. My focus is on juniper certs right now, but I've got 3-4 FBSD PCs now to compare the JunOS to.
I admit I have not ever installed a 'package', but I do have a history in Network Engineering, assembly/C, and have some simple no-compiler websites now on XP using IIS, and can figure anything out. But I don't have decades to learn web servers. My goal is to test, and maybe in the near future I (with help) will set up a web site which will be a site/org that people will pay to join. I'm sort of looking for help with the code to enable the username/login.payment part eventually. I'm rambling...
I have little idea even HOW to install a http server either. I'm just a network guy dabbling in unix !


----------



## drhowarddrfine (May 10, 2020)

Yes. You are rambling.

The most used servers are www/apache24 and www/nginx but there are tons of others


----------



## drhowarddrfine (May 10, 2020)

mikey777 said:


> I have little idea even HOW to install a http server either.


The FreeBSD Handbook


----------



## mikey777 (May 10, 2020)

I have been reading in the past year re Apache, but, it seems in general that the focus is on people who know exactly what they're doing and have done it 100x.
I'm looking for a large file, a package maybe?, that says Apache-versionhere-Install.me
Which files do I need ?
Do I have to compile Apache on the box I'll use it on ?
Nowhere can I find 'this is how it's done'....
Does FreeBSD have binaries ? Is there a reason this is not a good thing to do ?
The Handbook doesn't say how to install it. I will write a a doc when I'm done !


----------



## richardtoohey2 (May 10, 2020)

It depends on what you want - no-one else knows that.

Do you want the kitchen sink web delivery, or a stream-lined, deliver static content only lean machine?

Do you want/need dynamic pages?  If so, delivered by what?  Perl?  PHP?  Something else?

Do you want to compile things or would you prefer to install binary packages?  There are pros and cons of both.  No-one knows what suits you best.

It could be as simple as:

pkg install apache24

Look at something like Freshports - it tells you what to do for a package you are interested in:






						FreshPorts -- Search
					

Search




					www.freshports.org
				




*To install the port:*_ cd /usr/ports/www/apache24/ && make install clean
*To add the package:* pkg install apache24_

If you want a "LAMP" stack then you might need PHP and MySQL, too.  But if you want PHP do you want to use the Apache module mod_php (older and deprecated but lots of info about it) or the more modern php_fpm?

If you use a search engine for "apache24 FreeBSD" or "nginx FreeBSD" - sure there are plenty of how-tos.

In the handbook there are instructions and links: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-apache.html


----------



## memreflect (May 10, 2020)

mikey777 said:


> Do I have to compile Apache on the box I'll use it on ?
> Nowhere can I find 'this is how it's done'....
> Does FreeBSD have binaries ? Is there a reason this is not a good thing to do ?
> The Handbook doesn't say how to install it. I will write a a doc when I'm done !


Yes, FreeBSD has binaries.  The Handbook doesn't say how to install Apache because you need to know how to install software on the system in the first place, which is why you need to read Chapter 4. Installing Applications: Packages and Ports (emphasis mine):


> FreeBSD is bundled with a rich collection of system tools as part of the base system. In addition, FreeBSD provides two complementary technologies for installing third-party software: the FreeBSD Ports Collection, for installing from source, and *packages, for installing from pre-built binaries.* Either method may be used to install software from local media or from the network.



You will probably find that section of the Handbook in one of your native languages if English isn't your native language.  Select your choice of language at https://www.freebsd.org/doc/ then click "books" and click "handbook".


----------



## 20-100-2fe (May 10, 2020)

It is always a very bad idea to ask HOW before you know WHAT.

Depending on WHAT, you could possibly find tens of existing solutions in which you just have to configure the site name, its logo and a few other options to get started.

The first 2 popping up in my mind are WordPress + WooCommerce and Prestashop.

Then, when you'll have determined which solution will require the less additional work from you, you'll know which other packages you have to install. For instance, WordPress only works with MySQL, so the database is a choice you don't have to make.

For the web server, if you choose Apache or nginx, all the questions you'll have will probably already have been answered on some forum.  If you're already familiar with one of these, just go for it.

While you think about all this to make your decision, it would be a good idea to also spend some time playing with a FreeBSD VM and reading the Handbook. It takes time to get familiar with any OS.



mikey777 said:


> My goal is to test, and maybe in the near future I (with help) will set up a web site which will be a site/org that people will pay to join.
> [...]
> I have little idea even HOW to install a http server either.


----------



## deadmorozz (May 10, 2020)

Lighthttpd


----------



## mark_j (May 10, 2020)

That's lighttpd and yes, it's a good alternative. It's lighter (ha!) than Apache and Nginx but the documentation and general knowledge base is smaller than the "big 2".


----------



## drhowarddrfine (May 10, 2020)

My advice:
Slow down, you move too fast
You got to make the morning last
Just kick down the cobblestones
Look for fun and feel groovy


----------



## kpedersen (May 10, 2020)

mikey777 said:


> but I've got 3-4 FBSD PCs now to compare the JunOS to.



You mention you are using XP and IIS. These are ancient technology. You might want to make sure that your FreeBSD installs are not equally as ancient.

You also seem to be fairly new to "web stuff". In that case I would stick to what is most popular (Apache), purely because most tutorials and information is on Apache which you can then use to cross check and come up with a potential solution.

I would also suggest pick your "language" first, be it PHP, Python, etc because that might govern what you end up using as a server.


----------



## mikey777 (May 12, 2020)

So far, I prefer to hand code, no compiler 'languages'. I don't want what I've seen on the Net as websites, like juniper.net or cisco.com as they are FAT fat fat with useless code and pics IMHO. I don't want moving objects, metadata, virtual this or that. So far I need the code for contacting a payment processor, and logins, and a backend db. Another project i'll never get to it seems is to design a site to compete with ebay, which has lost focus. I believe I can put them out of business with a different site. The goal is to make $ of course, and to provide a site for people to buy/sell, but ebay has lost touch with reality, and they get away with because no one else has a website to compete. 
I have many ideas for websites to make $, but i'm too old to be in college (like Mark Z) and have folks all around that can code. If I had enuff $ I would just hire people.
Oh yea, I realize that XP and IIS are ancient, but progress is not always good. Sometimes it's the opposite as can be seen with Win7/8/10 which i wouldnt' use if someone paid me by the hour. I've been using XP for 20 years, and I can't recall the last time it crashed, or couldn't do what I needed. I have 20 Dells running XP.
I think all this means is that I want a httpd for -
- simple, fast interface, no external fonts, no contact with google, no counting visitors
- I need a db to keep stuff in, whether it be usernames and passwords or stuff for sale
- logins passwords and IDs
- payment options
Does this lead to Apache and MySQL ? 
If I weren't retired, I wish I were in college again so I would know folks who want to be in and make $. That's all Mark had, programmers and an idea.


----------



## mark_j (May 12, 2020)

Let's assume you go with the current options: Apache and MySQL/MariaDB. That's a relatively easy part of your solution.

You then need to look for a package that FreeBSD offers to meet your needs. Something like one of the CMSs, payment gateways, eStores etc  or you could build your own with a language like php, python, perl and so on.

There are AMPLE examples floating around the web.

You don't need college for that; just initiative and time.


----------



## deadmorozz (May 12, 2020)

If there is Robot OS I hope there can be a similar logic choice (?) for a web server?


----------

