fixed docker build files for ubuntu
This commit is contained in:
parent
a1643e44e2
commit
0bfc4aaa51
@ -139,7 +139,7 @@ EOF
|
||||
## change the port number as specified on the command line
|
||||
echo "Configuring to listen on the port[$SERVICE_PORT] hide-index-page[$HIDE_INDEX_PAGE] https-redirected[$HTTPS_REDIRECTED]"
|
||||
|
||||
sed -r -i "s|^Listen[[:space:]]+.*|Listen ${SERVICE_PORT}|g" "${HTTPD_CONFIG_FILE}"
|
||||
sed -r -i "s|^Listen[[:space:]]+.*|Listen ${SERVICE_PORT}|g" "/etc/apache2/ports.conf"
|
||||
|
||||
if [[ "${HTTPS_REDIRECTED}" =~ [Yy][Ee][Ss] ]]
|
||||
then
|
||||
@ -155,20 +155,20 @@ fi
|
||||
if [[ "${HIDE_INDEX_PAGE}" =~ [Yy][Ee][Ss] ]]
|
||||
then
|
||||
sed -r -i 's|^index_page[[:space:]]*=.*$|index_page=""|g' "${CODEPOT_CONFIG_FILE}"
|
||||
cat <<EOF > /var/www/html/.htaccess
|
||||
RewriteEngine On
|
||||
|
||||
echo 'RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)$ index.php/$1 [L]
|
||||
EOF
|
||||
sed -r -i '/<Directory "\/var\/www">/,/<\/Directory>/s|^[[:space:]]*AllowOverride[[:space:]]+.*$| AllowOverride All|g' "${HTTPD_CONFIG_FILE}"
|
||||
RewriteRule ^(.*)$ index.php/$1 [L]' > /var/www/html/.htaccess
|
||||
|
||||
sed -r -i '/<Directory \/var\/www\/>/,/<\/Directory>/s|^[[:space:]]*AllowOverride[[:space:]]+.*$|\tAllowOverride All|g' "${HTTPD_CONFIG_FILE}"
|
||||
|
||||
else
|
||||
sed -r -i 's|^index_page[[:space:]]*=.*$|index_page="index.php"|g' "${CODEPOT_CONFIG_FILE}"
|
||||
rm -rf /var/www/html/.htaccess
|
||||
|
||||
sed -r -i '/<Directory "\/var\/www">/,/<\/Directory>/s|^[[:space:]]*AllowOverride[[:space:]]+.*$| AllowOverride None|g' "${HTTPD_CONFIG_FILE}"
|
||||
sed -r -i '/<Directory \/var\/www\/>/,/<\/Directory>/s|^[[:space:]]*AllowOverride[[:space:]]+.*$|\tAllowOverride None|g' "${HTTPD_CONFIG_FILE}"
|
||||
fi
|
||||
|
||||
#httpd server in the foreground
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
cd /tmp
|
||||
|
||||
## delete all files under /var/www/html
|
||||
rm -rf /var/www/html/*
|
||||
|
||||
tar -zxvf codepot-0.4.0.tar.gz && mv -f codepot-0.4.0 codepot && \
|
||||
touch -r * */* */*/* */*/*/* */*/*/*/* && \
|
||||
cd codepot && \
|
||||
|
@ -1,5 +1,11 @@
|
||||
cd /tmp
|
||||
|
||||
## delete all files under /var/www/html
|
||||
rm -rf /var/www/html/*
|
||||
|
||||
a2enmod rewrite
|
||||
a2enmod headers
|
||||
|
||||
tar -zxvf codepot-0.4.0.tar.gz && mv -f codepot-0.4.0 codepot && \
|
||||
cd codepot && \
|
||||
./configure \
|
||||
@ -24,6 +30,7 @@ sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /etc/codepot/perl/Codepot/AccessHandle
|
||||
cp -pf /etc/codepot/codepot.httpd /etc/apache2/conf-enabled/codepot.conf && \
|
||||
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf
|
||||
|
||||
|
||||
apt remove --purge -y --allow-remove-essential php-dev libsvn-dev make libfdisk1 && \
|
||||
apt autoremove --purge -y && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
@ -151,13 +151,13 @@ fi
|
||||
if [[ "${HIDE_INDEX_PAGE}" =~ [Yy][Ee][Ss] ]]
|
||||
then
|
||||
sed -r -i 's|^index_page[[:space:]]*=.*$|index_page=""|g' "${CODEPOT_CONFIG_FILE}"
|
||||
cat <<EOF > /var/www/html/.htaccess
|
||||
RewriteEngine On
|
||||
|
||||
echo 'RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)$ index.php/$1 [L]
|
||||
EOF
|
||||
RewriteRule ^(.*)$ index.php/$1 [L]' > /var/www/html/.htaccess
|
||||
|
||||
sed -r -i '/<Directory "\/var\/www\/html">/,/<\/Directory>/s|^[[:space:]]*AllowOverride[[:space:]]+.*$| AllowOverride All|g' "${HTTPD_CONFIG_FILE}"
|
||||
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user