This time there is always a brother asked in Linux under the Apache2 configuration, in fact very simple, here unified answer.
First, installation
Apt-get install, of course, is the simplest.
By the way, PHP5 and GD and so on together, basically without configuration can be used,
The default directory is/var/www, change the index.html to know.
Second, the configuration
Configuration files are in the/etc/apache2, you can open the directory under the apache2.conf look, the directory structure is very clear,
Grasp a little better, two with the suffix available is an optional configuration file, respectively, module and site, and the suffix is enabled is currently enabled, generally enable the directory is ln-s in the optional directory in the chain over , so that, When you write your new configuration, you should also create a new file in the optional directory and then link it to the Enable directory.
There is a multi-site configuration is very simple, is the site directory in the default file is renamed, and then the servername and DocumentRoot quite content to change to what you need to note that the WWW and root domain name is two configuration Oh, do not lazy, to separate change good can.
Third, the module
System modules are generally installed, only through the mods-enabled directory to load the module, is in this directory under the chain mods-available directory configuration file to load the module
A2enmod and A2dismod are used to maintain these symbolic connections. These two commands are provided by the Apache2-common package. The command format is also very simple: a2enmod [module] or a2dismod [module]
Most commonly used a2enmod rewrite, people who have eaten a loss know.
Iv. Other
Open. htaccess, this is commonly used, is in the station. htaccess enable, this Add rewrite module can be
AllowOverride property to all, this property is in the site's configuration file, which is said in the sites-available site configuration file, the premise is to put the previous line of work done first, generally after the installation of Drupal has this demand
Configuration effective, generally/etc/init.d/apache2 restart I like to use the service apache2 restart, the second method of typing less
First of all, brothers, I'll add them if they need me.
Give the brothers a few questions about how to deal with the common apache2 under Debian