]> git.proxmox.com Git - pve-manager.git/blob - www/templates/pve-old.conf.in
imported from svn 'pve-manager/pve2'
[pve-manager.git] / www / templates / pve-old.conf.in
1 <IfModule mpm_prefork_module>
2 StartServers 2
3 MinSpareServers 1
4 MaxSpareServers 2
5 MaxClients 50
6 MaxRequestsPerChild 30
7 </IfModule>
8
9 ServerName localhost
10 ServerSignature Off
11 ServerTokens Prod
12 ServerAdmin root
13 AddDefaultCharset 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
20 KeepAlive Off
21
22 DocumentRoot @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
35 ErrorLog /var/log/apache2/error.log
36
37 LogLevel warn
38
39 # do not log access to our ajax services
40 SetEnvIf Request_URI "^/ws/" dontlog
41
42 CustomLog /var/log/apache2/access.log combined env=!dontlog
43
44 Alias /images/ @WWW_IMAGEDIR@/
45 Alias /css/ @WWW_CSSDIR@/
46 Alias /ext/ @WWW_EXTDIR@/
47 Alias /javascript/ /usr/share/javascript/
48 Alias /vncterm/ /usr/share/vncterm/
49
50 # avoid authentication when accessing favicon
51 Alias /favicon.ico @WWW_IMAGEDIR@/favicon.ico
52
53 PerlModule Embperl
54 EMBPERL_SESSION_ARGS "config=DB_File Lock=Semaphore"
55
56 AddType text/html .epl
57
58 PerlRequire @WWW_ROOTDIR@/startup.pl
59
60 PerlSetVar PVESatisfy any
61 PerlSetVar PVEPath /
62 PerlSetVar PVELoginScript /login.pl
63
64 PerlTransHandler PVE::URLRewrite
65
66 Alias /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