httpd fix (bin/apachectl & directories) (#1831)

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* try to fix path issues. maybe.

* set APACHE_CONFDIR

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* try to fix

I deployed a new server with Ubuntu and tested on it. All OK

* quotes

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* modified:   projects/apache.org/httpd/package.yml

* add bin/apachectl

---------

Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
Andrew 2023-05-06 21:12:36 +03:00 committed by GitHub
parent 122b718304
commit 5443d2a9c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,12 @@ dependencies:
pcre.org/v2: '*'
gnome.org/libxml2: '*'
zlib.net: '*'
libexpat.github.io: '*'
runtime:
env:
HTTPD_ROOT: '{{prefix}}'
APACHE_CONFDIR: '{{prefix}}/conf'
build:
dependencies:
@ -29,23 +35,48 @@ build:
./configure $ARGS
make
make install
HTTPD_CONF=$(tea httpd -V 2>/dev/null | grep SERVER_CONFIG_FILE | sed 's/.*"\(.*\)"/\1/')
port=8080
while lsof -i:$port >/dev/null 2>&1; do
((port++))
done
if [ "$port" -ne 8080 ]; then
sed -i '' "s/Listen 8080/Listen $port/" {{prefix}}/$HTTPD_CONF
fi
sed -i.bak 's/#ServerName www.example.com:8080/ServerName localhost:'"$port"'/g' {{prefix}}/$HTTPD_CONF
cd "{{prefix}}/bin"
sed -i.bak \
-e "s_{{prefix}}_\$(cd \$(dirname \$0)/.. \&\& pwd)_g" \
-e "s/^HTTPD=\'\(.*\)\'$/HTTPD=\"\1\"/" \
apachectl envvars envvars-std
sed -i.bak \
-e 's_{{prefix}}_$(cd $(dirname $0)/.. && pwd)_g' \
-e 's/^HTTPD='\''\(.*\)'\''$/HTTPD="$(cd $(dirname $0)\/.. \&\& pwd)\/bin\/httpd"/' \
apachectl envvars envvars-std
rm apachectl.bak envvars.bak envvars-std.bak
cd ../conf
sed -i.bak \
-e 's_{{prefix}}_\${HTTPD\_ROOT}_' \
httpd.conf
rm httpd.conf.bak
env:
ARGS:
- --prefix="{{prefix}}"
- --enable-layout=Slackware-FHS
- --sbindir={{prefix}}/bin
- --mandir={{prefix}}/man
- --sysconfdir={{prefix}}/etc/httpd
- --datadir={{prefix}}/var/www
- --localstatedir={{prefix}}/var
- --enable-layout="Apache"
- --enable-mpms-shared=all
- --enable-mods-shared=all
- --enable-authnz-fcgi
- --enable-so
- --enable-ssl
- --enable-cgi
- --enable-pie
- --enable-suexec
- --with-suexec-bin={{prefix}}/suexec
- --with-suexec-caller=_www
- --with-suexec-bin={{prefix}}/suexec
- --with-port=8080
- --with-sslport=8443
- --with-apr={{deps.apache.org/apr.prefix}}
@ -62,6 +93,7 @@ build:
provides:
- bin/ab
- bin/apachectl
- bin/checkgid
- bin/fcgistarter
- bin/htcacheclean
@ -74,5 +106,7 @@ provides:
- bin/rotatelogs
- bin/suexec
test:
httpd -v | grep {{version}}
test:
script: |
httpd -v | grep {{version}}
apachectl -t -f "$APACHE_CONFDIR/httpd.conf"