Lonely Dreamer (sanmai) wrote,
Lonely Dreamer

https://pma.example.com apache vhost config

~ # aptitude install apache2-mpm-itk
~ # cat /etc/apache2/sites-available/pma

<IfModule mod_ssl.c>
#Listen pma.example.com:443
<VirtualHost pma.example.com:443>

	ServerName pma.example.com
	ServerAdmin admin@example.com

	DocumentRoot /home/pma/www/htdocs/
	<Directory /home/pma/www/htdocs/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	<Directory "/home/pma/www/htdocs/scripts">
		Order allow,deny
		Allow from none
	<Directory "/home/pma/www/htdocs/libraries">
		Order allow,deny
		Allow from none

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	ErrorLog /home/pma/www/logs/error.log
	CustomLog /home/pma/www/logs/access.log combined

	<IfModule itk.c>
		AssignUserID pma pma
		MaxClientsVHost 10

	AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-javascript image/x-icon text/css
	AddOutputFilter DEFLATE php js ico css png

	ExpiresActive on
	ExpiresByType image/jpeg "access plus 3 day"
	ExpiresByType image/gif "access plus 3 day"
	ExpiresByType text/css "access plus 3 day"
	ExpiresByType application/x-javascript "access plus 3 day"
	ExpiresByType image/x-icon "access plus 3 day"
	ExpiresByType image/png "access plus 3 day"

	SSLEngine on
	SSLCertificateFile /home/pma/pma.example.com_server.pem
	SSLCertificateKeyFile /home/pma/pma.example.com_privatekey.pem

	SSLProtocol all -SSLv2

	<FilesMatch "\.(cgi|shtml|phtml|php)$">
		SSLOptions +StdEnvVars

	BrowserMatch ".*MSIE.*" \
		nokeepalive ssl-unclean-shutdown \
		downgrade-1.0 force-response-1.0

	php_admin_value post_max_size "8M"
	php_admin_value upload_max_filesize "8M"
	php_admin_value session.gc_maxlifetime "14400"
Cм. также: phpMyAdmin quick setup
Сертификаты получаем по этой инструкции.
Tags: apache2, debian, linux, useful
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded