1

I wanted to learn perl CGI. So first I installed apache2 using following command:

   sudo apt-get install apache2*

Then I configured Apache and some configuration for CGI. But moving forward I wanted to know more about Apache modules. So I uninstalled the exisiting Apache and tried to install from apache site.

But it was a totally different installation and I got confused. I want to know what is the difference between two installations?

Can you please also help on the difference between "installed softwares". Actually when I installed with apt-get, I got all configuration in /etc/apache2 and "www" directory in /var. But when I install through source code, all configuration is in /usr/local/apache2 and www is replaced by "htdocs". What is this all about? An please also help on how can I get https as a command?

Now I have installed again using :

  sudo apt-get install lamp-server^

Now running CGI scripts successfully.

  • And there is one command I have seen somewhere: "httpd -M" to see the apache modules. But these "httpd" package is not there. Doesn't it come with apache? How I can install this? – prateek goyal Feb 23 '15 at 10:42
  • When you say "totally different installation", are you referring to installing the software or are you referring to the installed software and the experience using it. As I understand it you installed from source, and didn't fell comfortable because it was different. If you are confused about installing from source, then here is a guide. – somethingSomething Feb 23 '15 at 17:53
  • @somethingSomething Thanks for the answer. Actually, I wanted to know about the difference in "installed software". I am totally comfortable with installing from source. – prateek goyal Feb 24 '15 at 8:51
  • If you edit your question with additional questions, or change it dramatically you make it into a moving target. Such edits possible invalidate any existing answers. Such edits have a low chance of getting noticed as well. If you have additional questions, or encounter a new problem after solving the current issue while implementing an answer, post a new question. If an answer itself gives you problems write a comment, but never to ask for non-related follow up questions. – Anthon Feb 24 '15 at 15:39
1

But it was a totally different installation and I got confused.

If you compile from source from the official latest release, there can be some or significant changes in the software as I understand it.

Here is some info on software being delayed in getting to the repositories.

Excerpt:

Update Delays

One thing new Linux users often notice with package managers and repositories is a delay before new software versions reach their systems. For example, when a new version of Mozilla Firefox is released, Windows and Mac users will acquire it from Mozilla. On Linux, your Linux distribution must package the new version and push it out as an update. If you open Firefox’s preferences window on Linux, you’ll note that Firefox has no ability to automatically update itself (assuming you’re using the version of Firefox from your Linux distribution’s repositories).


I want to know what is the difference between two installations?

You could read up on these and go from there:

Overview of new features in Apache HTTP Server 2.4

Overview of new features in Apache HTTP Server 2.2

Module Index

Here are Apache's features on Wikipedia.

Excerpt:

Features

Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Some common language interfaces support Perl, Python, Tcl, and PHP. Popular authentication modules include mod_access, mod_auth, mod_digest, and mod_auth_digest, the successor to mod_digest. A sample of other features include Secure Sockets Layer and Transport Layer Security support (mod_ssl), a proxy module (mod_proxy), a URL rewriter (mod_rewrite), custom log files (mod_log_config), and filtering support (mod_include and mod_ext_filter).

Popular compression methods on Apache include the external extension module, mod_gzip, implemented to help with reduction of the size (weight) of Web pages served over HTTP. ModSecurity is an open source intrusion detection and prevention engine for Web applications. Apache logs can be analyzed through a Web browser using free scripts, such as AWStats/W3Perl or Visitors.

Virtual hosting allows one Apache installation to serve many different Web sites. For example, one machine with one Apache installation could simultaneously serve www.example.com, www.example.org, test47.test-server.example.edu, etc.

Apache features configurable error messages, DBMS-based authentication databases, and content negotiation. It is also supported by several graphical user interfaces (GUIs).

It supports password authentication and digital certificate authentication. Because the source code is freely available, anyone can adapt the server for specific needs, and there is a large public library of Apache add-ons.


Here someone is like you trying to understand the difference between the version his Linux distribution uses and newer ones released by the official developer.

Since you don't mention your distribution, I'm assuming that it's Ubuntu, I use Debian Wheezy, and here is apache2 for that release:

root  # apt-cache policy apache2
apache2:
  Installed: (none)
  Candidate: 2.2.22-13+deb7u4
  Version table:
     2.2.22-13+deb7u4 0
        500 http://the.earth.li/debian/ wheezy/main amd64 Packages
     2.2.22-13+deb7u3 0
        500 http://security.debian.org/ wheezy/updates/main amd64 Packages

You can find an explanation and information about the LAMP stack here.

Excerpt:

LAMP is an acronym for an archetypal model of web service solution stacks, originally consisting of largely interchangeable components: Linux, the Apache HTTP Server, the MySQL relational database management system, and the PHP programming language. As a solution stack, LAMP is suitable for building dynamic web sites and web applications.1

The LAMP model has since been adapted to other componentry, though typically consisting of free and open-source software. As an example, the equivalent installation on a Microsoft Windows operating system is known as WAMP. enter image description here

  • 1
    Thanks a Lot man for explanation. It is the most useful explanation I have ever seen. – prateek goyal Feb 24 '15 at 8:54
  • @prateekgoyal Glad to help. – somethingSomething Feb 24 '15 at 8:59
  • 1
    Can you please also help on the difference between "installed softwares". Actually when I installed with apt-get, I got all configuration in /etc/apache2 and "www" directory in /var. But when I install through source code, all configuration is in /usr/local/apache2 and www is replaced by "htdocs". What is this all about? An please also help on how can I get https as a command? – prateek goyal Feb 24 '15 at 9:07
  • @prateekgoyal I found some links for you to look at, investigate this first. link, link, link Also, you should update your question if you have new information about your question. – somethingSomething Feb 24 '15 at 9:35
  • Here is some more about Linux file-system/directories. And here. – somethingSomething Feb 24 '15 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.