51 lines
1.3 KiB
Smarty
51 lines
1.3 KiB
Smarty
cat<<EOD
|
|
<VirtualHost *:80>
|
|
ServerAdmin ${APACHE_SERVERADMIN}
|
|
|
|
ServerName ${APACHE_SERVERNAME}
|
|
ServerAlias ${APACHE_SERVERALIAS}
|
|
|
|
DocumentRoot ${APACHE_DOCUMENTROOT}
|
|
|
|
|
|
<IfModule mod_ruid2.c>
|
|
|
|
RMode config
|
|
|
|
RDefaultUidGid ${APACHE_RUN_USER} ${APACHE_RUN_USER}
|
|
RUidGid ${APACHE_RUN_USER} ${APACHE_RUN_USER}
|
|
RGroups ${APACHE_RUN_USER}
|
|
</IfModule>
|
|
|
|
DirectoryIndex index.html index.htm index.php welcome.html
|
|
|
|
<Directory ${APACHE_DOCUMENTROOT}>
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride All
|
|
|
|
SetEnvIfNoCase User-agent "^Baidu" bad_bot
|
|
SetEnvIfNoCase User-agent "^Yandex" bad_bot
|
|
SetEnvIfNoCase User-agent "^Sosospider" bad_bot
|
|
SetEnvIfNoCase User-agent "^AhrefsBot" bad_bot
|
|
SetEnvIfNoCase User-agent "^linkdexbot" bad_bot
|
|
|
|
<RequireAll>
|
|
Require all granted
|
|
Require not env bad_bot
|
|
</RequireAll>
|
|
</Directory>
|
|
|
|
Alias /cgi-bin/ ${APACHE_CGI_DIR}
|
|
<Directory /home/www/${APACHE_CGI_DIR}>
|
|
Options +ExecCGI
|
|
AddHandler cgi-script cgi pl
|
|
</Directory>
|
|
|
|
LogLevel warn
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/${APACHE_SERVERNAME}_error.log
|
|
CustomLog ${APACHE_LOG_DIR}/${APACHE_SERVERNAME}_access.log combined
|
|
|
|
</VirtualHost>
|
|
EOD
|