Difference between revisions of "Apache"

From Alessandro's Wiki
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
* Potente server web multipiattaforma
* Potente server web multipiattaforma
== Configurazione ==
== Configurazione ==
Impostare ServerName!
=== Bandwidth ===
wget http://bwmod.sourceforge.net/files/mod_bw-0.7.tgz
tar zxvf mod_bw-0.7.tgz
cd mod_bw
apxs2 -i -a -c mod_bw.c


=== Direcoty Indexes ===
Per ingrandire la colonna del nome del file:
IndexOptions NameWidth=*
Aggiungere un alias per esportare una directory non nella root www:
Alias /_bin "/ciao/_linux_bin/"
<Directory "/ciao/_linux_bin/">
  Options Indexes MultiViews
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>
=== In Gentoo ===
=== In Gentoo ===
* vado diretto alla versione 2:
* vado diretto alla versione 2:
Line 9: Line 25:
* Directory del web default:
* Directory del web default:
  /var/www/localhost/htdocs
  /var/www/localhost/htdocs
* Installarlo:
* Installarlo:
  emerge -pvtD apache
  emerge -pvtD apache
controllare le USE flags che ci servono e poi
controllare le USE flags che ci servono e poi
  emerge apache
  emerge apache
=== In Fedora ===
=== In Fedora ===
* file di configurazione;
* file di configurazione;
Line 21: Line 34:
* Directori del web default:
* Directori del web default:
  /var/www/html/
  /var/www/html/
* Installarlo
yum install httpd


* Installarlo
=== SSL VirtualHost ===
  yum install apache
 
* using Gentoo distribution.
 
# enable '''ssl''' use flag for apache package
# edit default virtual host for a listening interface and port:
 
 
==== Generating certificate ====
 
* replace the "server" name with your domain name of your website.
 
SRVname=server
cd /etc/ssl/apache2
  openssl genrsa 2048 > $SRVname.key
openssl req -new -x509 -nodes -sha1 -days 365 -key $SRVname.key > $SRVname.crt
 
* Repeat the last step as many virtual hosts you have to serve under an ssl connection, remember to change the SRVname variable in the code:

Revision as of 10:54, 6 November 2010

  • Potente server web multipiattaforma

Configurazione

Impostare ServerName!

Bandwidth

wget http://bwmod.sourceforge.net/files/mod_bw-0.7.tgz
tar zxvf mod_bw-0.7.tgz
cd mod_bw
apxs2 -i -a -c mod_bw.c

Direcoty Indexes

Per ingrandire la colonna del nome del file:

IndexOptions NameWidth=*

Aggiungere un alias per esportare una directory non nella root www:

Alias /_bin "/ciao/_linux_bin/"
<Directory "/ciao/_linux_bin/">
 Options Indexes MultiViews
 AllowOverride None
 Order allow,deny
 Allow from all
</Directory>

In Gentoo

  • vado diretto alla versione 2:
    • file di configurazione;
/etc/apache2/httpd.conf
  • Directory del web default:
/var/www/localhost/htdocs
  • Installarlo:
emerge -pvtD apache

controllare le USE flags che ci servono e poi

emerge apache

In Fedora

  • file di configurazione;
/etc/httpd/conf/httpd.conf
  • Directori del web default:
/var/www/html/
  • Installarlo
yum install httpd

SSL VirtualHost

  • using Gentoo distribution.
  1. enable ssl use flag for apache package
  2. edit default virtual host for a listening interface and port:


Generating certificate

  • replace the "server" name with your domain name of your website.
SRVname=server
cd /etc/ssl/apache2
openssl genrsa 2048 > $SRVname.key
openssl req -new -x509 -nodes -sha1 -days 365 -key $SRVname.key > $SRVname.crt
  • Repeat the last step as many virtual hosts you have to serve under an ssl connection, remember to change the SRVname variable in the code: