]> git.proxmox.com Git - pve-manager.git/blame - www/templates/pve-old.conf.in
imported from svn 'pve-manager/pve2'
[pve-manager.git] / www / templates / pve-old.conf.in
CommitLineData
aff192e6
DM
1<IfModule mpm_prefork_module>
2 StartServers 2
3 MinSpareServers 1
4 MaxSpareServers 2
5 MaxClients 50
6 MaxRequestsPerChild 30
7</IfModule>
8
9ServerName localhost
10ServerSignature Off
11ServerTokens Prod
12ServerAdmin root
13AddDefaultCharset On
14
15# Hint: Ajax use KeepAlive, which in effect disables MaxRequestsPerChild,
16# so we need to disable KeepAlive to prevent exhaustive memory usage, or
17# at least make sure that periodic updaters interval > KeepAliveTimeout
18# or maybe we should set "MaxKeepAliveRequests 20"
19
20KeepAlive Off
21
22DocumentRoot @WWW_ROOTDIR@
23<Directory />
24 Options FollowSymLinks
25 AllowOverride None
26</Directory>
27
28<Directory @WWW_ROOTDIR@>
29 Options FollowSymLinks MultiViews
30 AllowOverride None
31 Order allow,deny
32 allow from all
33</Directory>
34
35ErrorLog /var/log/apache2/error.log
36
37LogLevel warn
38
39# do not log access to our ajax services
40SetEnvIf Request_URI "^/ws/" dontlog
41
42CustomLog /var/log/apache2/access.log combined env=!dontlog
43
44Alias /images/ @WWW_IMAGEDIR@/
45Alias /css/ @WWW_CSSDIR@/
46Alias /ext/ @WWW_EXTDIR@/
47Alias /javascript/ /usr/share/javascript/
48Alias /vncterm/ /usr/share/vncterm/
49
50# avoid authentication when accessing favicon
51Alias /favicon.ico @WWW_IMAGEDIR@/favicon.ico
52
53PerlModule Embperl
54EMBPERL_SESSION_ARGS "config=DB_File Lock=Semaphore"
55
56AddType text/html .epl
57
58PerlRequire @WWW_ROOTDIR@/startup.pl
59
60PerlSetVar PVESatisfy any
61PerlSetVar PVEPath /
62PerlSetVar PVELoginScript /login.pl
63
64PerlTransHandler PVE::URLRewrite
65
66Alias /nrd/ /__no_real_dir__/
67
68<Directory "@WWW_ROOTDIR@">
69 AuthType PVE::AuthCookieHandler
70 AuthName PVE
71 PerlSetVar PVECookieName PVEAuthCookie
72 #PerlSetVar AuthCookieDebug 5
73
74 PerlAuthenHandler PVE::AuthCookieHandler->authenticate
75 PerlAuthzHandler PVE::AuthCookieHandler->authorize
76
77 require group root
78
79 DirectoryIndex index.htm index.pl
80
81 <FilesMatch ".*\.htm$">
82 EMBPERL_APPNAME PVE
83 EMBPERL_SYNTAX EmbperlBlocks
84 EMBPERL_OBJECT_BASE base.epl
85 EMBPERL_INPUT_ESCMODE 0
86 EMBPERL_ESCMODE 0
87 SetHandler perl-script
88 PerlHandler Embperl::Object
89 Options ExecCGI
90 </FilesMatch>
91 <FilesMatch ".*\.epl$">
92 Order allow,deny
93 Deny From all
94 </FilesMatch>
95 <FilesMatch ".*\.pl$">
96 SetHandler perl-script
97 PerlHandler ModPerl::Registry
98 Options +ExecCGI
99 </FilesMatch>
100
101</Directory>
102
103<Location /nrd/LOGIN>
104 AuthType PVE::AuthCookieHandler
105 AuthName PVE
106 PerlSetVar PVECookieName PVEAuthCookie
107 #PerlSetVar AuthCookieDebug 5
108 SetHandler perl-script
109 PerlHandler PVE::AuthCookieHandler->login
110</Location>
111
112<Location /ws/>
113 SetHandler perl-script
114 PerlHandler $PVE::HTMLServices::Obj->handler
115</Location>
116
117<VirtualHost *:443>
118
119 SSLEngine on
120 SSLProtocol all -SSLv2
121 SSLCertificateFile @PROXMOX_ETC@/pve-ssl.pem
122 SSLCertificateKeyFile @PROXMOX_ETC@/pve-ssl.key
123
124 RewriteEngine on
125 RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
126 RewriteRule .* - [F]
127
128 </VirtualHost>
129
130<VirtualHost *:80>
131 #RewriteLog "/root/rewrite.log"
132 #RewriteLogLevel 10
133 RewriteEngine on
134 RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
135 RewriteRule .* - [F]
136 RewriteCond %{REQUEST_URI} !^/nrd/
137 RewriteCond %{REQUEST_URI} !^/images/
138 RewriteCond %{REQUEST_URI} !^/css/
139 RewriteCond %{REQUEST_URI} !^/ext/
140 RewriteCond %{REQUEST_URI} !^/javascript/
141 RewriteCond %{REQUEST_URI} !^/vncterm/
142 RewriteCond %{REQUEST_URI} !^/.*\.js$
143 RewriteCond %{REQUEST_URI} !^/login.pl$
144 RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [L,R]
145</VirtualHost>
146