?

Log in

No account? Create an account

Previous Entry Share Next Entry
https://pma.example.com apache vhost config
Mac
sanmai
~ # 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>
	<Directory "/home/pma/www/htdocs/scripts">
		Order allow,deny
		Allow from none
	</Directory>
	<Directory "/home/pma/www/htdocs/libraries">
		Order allow,deny
		Allow from none
	</Directory>


	# 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
	</IfModule>

	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

	SSLCipherSuite HIGH:MEDIUM
	SSLProtocol all -SSLv2

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

	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"
</VirtualHost>
</IfModule>
Cм. также: phpMyAdmin quick setup
Сертификаты получаем по этой инструкции.