Alternc  latest
Alternc logiel libre pour l'hébergement
vhost-http.conf
Go to the documentation of this file.
1 # %%fqdn%%
2 <Virtualhost *:443>
3  ServerName %%fqdn%%
4  AssignUserId #%%UID%% #%%GID%%
5  SetEnv LOGIN "%%UID%%-%%LOGIN%%"
6  KeepAlive Off
7  RewriteEngine On
8  RewriteCond %{REQUEST_FILENAME} !/cgi-bin/
9  RewriteCond %{REQUEST_FILENAME} !/.well-known/acme-challenge/
10  RewriteRule ^/(.*)$ http://%%fqdn%%/$1 [R=301,L]
11  SSLEngine On
12  SSLCertificateFile %%CRT%%
13  SSLCertificateKeyFile %%KEY%%
14  %%CHAINLINE%%
15 </Virtualhost>
16 <VirtualHost *:80>
17  ServerName %%fqdn%%
18  DocumentRoot "%%document_root%%"
19  AssignUserId #%%UID%% #%%GID%%
20  SetEnv LOGIN "%%UID%%-%%LOGIN%%"
21  <Directory "%%document_root%%">
22  php_admin_value open_basedir "%%account_root%%:/usr/share/php/"
23  php_admin_value upload_tmp_dir %%account_root%%/tmp
24  php_admin_value sys_temp_dir %%account_root%%/tmp
25  php_admin_value sendmail_path '/usr/lib/alternc/sendmail "%%mail_account%%" '
26  php_admin_flag mail.add_x_header on
27  Options -MultiViews -FollowSymLinks +SymLinksIfOwnerMatch
28  AllowOverride AuthConfig FileInfo Limit Options Indexes Options=All,MultiViews
29  Require all granted
30  </Directory>
31 
32 # If you want to log the errors also in /var/log/alternc/sites/
33 # WARNING: this WILL FORK a vlogger for EACH VHOST having this !!! the load on the machine may be high
34 # when having many vhosts. as a consequence, this is disabled by default
35 # ErrorLog "|| /usr/sbin/vlogger -e -u alterncpanel -g alterncpanel -s error.log -t \"error-%Y%m%d.log\" /var/log/alternc/sites/%%UID%%-%%LOGIN%%/"
36 </VirtualHost>