Compare commits

...

5 Commits

Author SHA1 Message Date
dami da515f8595 Update install.sh 2026-04-11 23:57:37 +08:00
dami 467a8af504 Update httpd.conf 2026-04-11 23:55:46 +08:00
dami ed16571d44 Update install.sh 2026-04-11 23:53:49 +08:00
dami 6d06f1fbce update 2026-04-11 23:53:31 +08:00
dami 9a59b2ad3f Update install.sh 2026-04-11 23:51:33 +08:00
5 changed files with 34 additions and 15 deletions

View File

@ -1,5 +1,5 @@
ServerRoot "{$SERVER_PATH}/apache/httpd"
Listen 127.0.0.1:8280
Listen 8280
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so

View File

@ -3,15 +3,14 @@ Description=Apache Web Server
After=network.target
[Service]
Type=forking
PIDFile={$SERVER_PATH}/apache/httpd/logs/httpd.pid
ExecStart={$SERVER_PATH}/apache/httpd/bin/apachectl start
ExecReload={$SERVER_PATH}/apache/httpd/bin/apachectl graceful
ExecStop={$SERVER_PATH}/apache/httpd/bin/apachectl stop
Type=simple
Environment=LANG=C
ExecStart={$SERVER_PATH}/apache/httpd/bin/httpd $OPTIONS -DFOREGROUND
ExecReload={$SERVER_PATH}/apache/httpd/bin/httpd $OPTIONS -k graceful
KillSignal=SIGWINCH
KillMode=mixed
PrivateTmp=true
User=www
Group=www
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,17 @@
[Unit]
Description=Apache Web Server
After=network.target
[Service]
Type=forking
PIDFile={$SERVER_PATH}/apache/httpd/logs/httpd.pid
ExecStart={$SERVER_PATH}/apache/httpd/bin/apachectl start
ExecReload={$SERVER_PATH}/apache/httpd/bin/apachectl graceful
ExecStop={$SERVER_PATH}/apache/httpd/bin/apachectl stop
PrivateTmp=true
User=www
Group=www
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -59,15 +59,15 @@ if [ "${2}" == "" ];then
fi
if [ "${action}" == "uninstall" ];then
if [ -f /usr/lib/systemd/system/apache.service ] || [ -f /lib/systemd/system/apache.service ];then
systemctl stop apache
rm -rf /usr/systemd/system/apache.service
rm -rf /lib/systemd/system/apache.service
if [ -f /usr/lib/systemd/system/httpd.service ] || [ -f /lib/systemd/system/httpd.service ];then
systemctl stop httpd
rm -rf /usr/systemd/system/httpd.service
rm -rf /lib/systemd/system/httpd.service
systemctl daemon-reload
fi
if [ -f $serverPath/apache/init.d/apache ];then
$serverPath/apache/init.d/apache stop
if [ -f $serverPath/apache/init.d/httpd ];then
$serverPath/apache/init.d/httpd stop
fi
rm -rf $serverPath/apache

View File

@ -131,6 +131,9 @@ Install_App()
OPTIONS="${OPTIONS} --with-apr=$APR_CONFIG"
OPTIONS="${OPTIONS} --with-apr-util=$APU_CONFIG"
# if [ "$sysName" != "Darwin" ];then
# OPTIONS="${OPTIONS} --enable-systemd"
# fi
# echo "cd ${apacheDir}/httpd-${VERSION} && ./configure --prefix=$serverPath/apache $OPTIONS"
cd ${apacheDir}/httpd-${VERSION} && ./configure \
--prefix=$serverPath/apache/httpd \