Difference between revisions of "System/Apache"
Jump to navigation
Jump to search
(Created page with "== RPAF == == MySQL logging == Install the module apt-get install libapache2-mod-log-sql-mysql Create database and grant access to mysql user: CREATE DATABASE apachelog...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | == openssl == | ||
+ | |||
+ | Remove passphrase from key: | ||
+ | |||
+ | openssl rsa -in server.key -out server-nopass.key | ||
+ | |||
+ | Gandi, without any questions: | ||
+ | |||
+ | openssl req -nodes -newkey rsa:2048 -subj "/C=FR/ST=State/L=Town/O=Organisation/CN=my.domain.fr" -keyout my.domain.fr.key -out my.domain.fr.csr | ||
+ | |||
+ | Generate a self signed certificate in one step: | ||
+ | |||
+ | openssl req -new -newkey rsa:4096 -days 730 -nodes -x509 -subj "/C=US/ST=State/L=Town/O=Organisation/CN=my.domain.fr" -keyout my.domain.fr.key -out my.domain.fr.cert | ||
+ | |||
== RPAF == | == RPAF == | ||
Line 11: | Line 25: | ||
CREATE DATABASE apachelogs; | CREATE DATABASE apachelogs; | ||
GRANT INSERT,CREATE ON apachelogs.* | GRANT INSERT,CREATE ON apachelogs.* | ||
− | TO | + | TO apachelog@localhost |
− | IDENTIFIED BY ' | + | IDENTIFIED BY 'password'; |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
In apache config, add the configuration for the module: | In apache config, add the configuration for the module: | ||
− | LogSQLLoginInfo mysql:// | + | LogSQLLoginInfo mysql://apachelog:password@localhost/apachelogs |
LogSQLCreateTables on | LogSQLCreateTables on | ||
LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock | LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock | ||
Line 24: | Line 38: | ||
In each Virtual Host, add this line: | In each Virtual Host, add this line: | ||
− | LogSQLTransferLogTable | + | LogSQLTransferLogTable table_name_for_this_vhost |
Latest revision as of 11:20, 6 July 2012
openssl
Remove passphrase from key:
openssl rsa -in server.key -out server-nopass.key
Gandi, without any questions:
openssl req -nodes -newkey rsa:2048 -subj "/C=FR/ST=State/L=Town/O=Organisation/CN=my.domain.fr" -keyout my.domain.fr.key -out my.domain.fr.csr
Generate a self signed certificate in one step:
openssl req -new -newkey rsa:4096 -days 730 -nodes -x509 -subj "/C=US/ST=State/L=Town/O=Organisation/CN=my.domain.fr" -keyout my.domain.fr.key -out my.domain.fr.cert
RPAF
MySQL logging
Install the module
apt-get install libapache2-mod-log-sql-mysql
Create database and grant access to mysql user:
CREATE DATABASE apachelogs; GRANT INSERT,CREATE ON apachelogs.* TO apachelog@localhost IDENTIFIED BY 'password'; FLUSH PRIVILEGES;
In apache config, add the configuration for the module:
LogSQLLoginInfo mysql://apachelog:password@localhost/apachelogs LogSQLCreateTables on LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock LogSQLTransferLogFormat AabfHhmRSsTUuvI
In each Virtual Host, add this line:
LogSQLTransferLogTable table_name_for_this_vhost