Here is a list of popular open source web servers.
- LightTPD (YouTube, Meebo, Wikipedia)
Apache's initial release came in the year 1995. It is the most widely used web server around since then.
- powers 100 million websites (early 2009), over 46% of total
- Most popular web server since 1996
- Lineage going back to NCSA HTTPd
- A comprehensive set of features - you want it, it has it.
sudo apt-get install apache2
Apache is installed in /etc/apache2.
|apache2.conf||The main Apache2 configuration file. Contains settings that are global to Apache2.|
|conf.d||Contains configuration files which apply globally to Apache. Other packages that use Apache2 to serve content may add files, or symlinks, to this directory.|
|envars||File where Apache2 environment variables are set.|
|httpd.conf||Historically the main Apache2 configuration file, named after the httpd daemon. The file can be used for user-specific configuration options that globally effect Apache2.|
|mods-available||This directory contains configuration files to both load modules and configures them.|
|mods-enabled||Holds symlinks to the files in /etc/apache2/mods-available.|
|ports.conf||Houses the directives that determine which TCP ports Apache2 is listening on.|
|sites-available||This directory has configuration files for Apache Virtual Hosts.Virtual Hosts allow Apache2 to be configured for multiple sites that have separate configurations.|
|sites-enabled||Like mods-enabled, sites-enabled contains symlinks to the /etc/apache2/sites-available directory. Similarly when a configuration file in sites-available is symlinked it will be active once Apache is restarted.|
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined </VirtualHost>
Port number of site --><VirtualHost *:80> Email of webmaster -->ServerAdmin webmaster@localhost Root directory of site files --></Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> Static files block --> Static files block --> Error log file --> Access log file -->
Apache supports multiple sites on the same machine. Assign sites by port number, sub-domain, directory name, or any combination of the above.
After any configuration changes, restart Apache
sudo /etc/init.d/apache2 restart
There are many modules that provide additional functionality.
These modules can be installed and loaded dynamically.
Installs the MySQL authentication module
sudo apt-get install libapache2-mod-authmysql
after press enter key get these result
Enables the new module and restarts apache
sudo a2enmode auth_mysql sudo /etc/init.d/apache2 restart
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook