pve.conf 1.99 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<IfModule mpm_prefork_module>
    StartServers 2
    MinSpareServers 1 
    MaxSpareServers 2
    MaxClients          50
    MaxRequestsPerChild 200
</IfModule>

ServerName localhost
ServerSignature Off
ServerTokens Prod
ServerAdmin root
AddDefaultCharset On

15 16 17 18 19 20
# Hint1: Ajax use KeepAlive. We wnat that to get better performance.
# Hint2: We need to limit the number of request to avoid exhaustive 
# memory usage (we still have small memory leaks).
# Apache KeepAlive in effect disables MaxRequestsPerChild,
# (max request are  MaxRequestsPerChild*MaxKeepAliveRequests)
# so we implemented and additional limit in REST.pm
21

22 23 24
# But KeepAlive spawns too many processes - so we disable that for now
KeepAlive off
MaxKeepAliveRequests 200
25 26 27 28 29 30 31 32 33 34 35

<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE application/json
</IfModule>

CustomLog ${APACHE_LOG_DIR}/access.log combined

Listen 8006
<VirtualHost *:8006>
    SSLEngine on
    SSLProtocol all -SSLv2
36 37
    SSLCertificateFile /etc/pve/local/pve-ssl.pem
    SSLCertificateKeyFile /etc/pve/local/pve-ssl.key
38 39 40 41 42

    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]

43
    DocumentRoot /usr/share/pve-manager/root
44 45 46 47 48
    <Directory />
	Options FollowSymLinks
	AllowOverride None
    </Directory>

49
    <Directory /usr/share/pve-manager/root>
50 51 52 53 54 55
	Options FollowSymLinks MultiViews
	AllowOverride None
	Order allow,deny
	allow from all
    </Directory>

56 57 58
    Alias /pve2/css/ /usr/share/pve-manager/css/
    Alias /pve2/ext4 /usr/share/pve-manager/ext4/
    Alias /pve2/images/ /usr/share/pve-manager/images/
59 60 61
    Alias /vncterm/ /usr/share/vncterm/
 
    # avoid authentication when accessing favicon
62
    Alias /favicon.ico /usr/share/pve-manager/images/favicon.ico
63

64
    PerlRequire /usr/share/pve-manager/startup.pl
65 66 67 68 69 70 71 72 73 74 75 76 77 78

    <Location /index.pl>
        SetHandler perl-script	
        PerlHandler ModPerl::Registry
        Options ExecCGI		
    </Location>

    <Location /api2/>
        SetHandler perl-script
        PerlHandler PVE::REST 
    </Location>

</VirtualHost>