Commit 99cb22d7 authored by tbrehm's avatar tbrehm
Browse files

- Changed default root for websites from /var/clients to /var/www/clients.

- Added deny directives to prevent direct access to the /var/www/clients and /var/www/domain.tld directories.
parent a29914f4
...@@ -7,4 +7,10 @@ ...@@ -7,4 +7,10 @@
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "| /usr/sbin/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig CustomLog "| /usr/sbin/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig
<Directory /var/www/clients>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
...@@ -29,8 +29,8 @@ message_size_limit=0 ...@@ -29,8 +29,8 @@ message_size_limit=0
getmail_config_dir=/etc/getmail getmail_config_dir=/etc/getmail
[web] [web]
website_path=/var/clients/client[client_id]/web[website_id] website_path=/var/www/clients/client[client_id]/web[website_id]
website_symlinks=/var/www/[website_domain]/:/var/clients/client[client_id]/[website_domain]/ website_symlinks=/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/
vhost_conf_dir=/etc/apache2/sites-available vhost_conf_dir=/etc/apache2/sites-available
vhost_conf_enabled_dir=/etc/apache2/sites-enabled vhost_conf_enabled_dir=/etc/apache2/sites-enabled
......
...@@ -6,6 +6,12 @@ ...@@ -6,6 +6,12 @@
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "| /usr/sbin/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig CustomLog "| /usr/sbin/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig
<Directory /var/www/clients>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<tmpl_loop name="ip_adresses"> <tmpl_loop name="ip_adresses">
NameVirtualHost {tmpl_var name="ip_address"}:80 NameVirtualHost {tmpl_var name="ip_address"}:80
NameVirtualHost {tmpl_var name="ip_address"}:443 NameVirtualHost {tmpl_var name="ip_address"}:443
......
<Directory /var/www/{tmpl_var name='domain'}>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost <tmpl_var name='ip_address'>:80> <VirtualHost <tmpl_var name='ip_address'>:80>
<tmpl_if name='php' op='==' value='suphp'> <tmpl_if name='php' op='==' value='suphp'>
DocumentRoot <tmpl_var name='web_document_root'> DocumentRoot <tmpl_var name='web_document_root'>
...@@ -27,7 +33,7 @@ ...@@ -27,7 +33,7 @@
ErrorDocument 500 /error/500.html ErrorDocument 500 /error/500.html
ErrorDocument 503 /error/503.html ErrorDocument 503 /error/503.html
</tmpl_if> </tmpl_if>
<Directory {tmpl_var name='web_document_root_www'}> <Directory {tmpl_var name='web_document_root_www'}>
Options FollowSymLinks Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo AllowOverride Indexes AuthConfig Limit FileInfo
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment