httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Cameron <thomas.came...@camerontech.com>
Subject [users@httpd] No matter what I do, the httpd.pid file is created in the wrong location at runtime!
Date Wed, 31 Jul 2019 18:51:58 GMT
OK, I'm just trying to learn about building Apache httpd. I am doing
what I thought was a basic build and packaging it as an rpm.

My process is:

./configure --prefix=/opt/apache --exec-prefix=/opt/apache
--localstatedir=/opt/apache/var --runstatedir=/opt/apache/var/run

make

make install

I have a systemd unit file that says:

[Unit]
Description=Apache Web Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/opt/apache/var/run/httpd.pid
ExecStart=/opt/apache/bin/apachectl start
ExecStop=/opt/apache/bin/apachectl graceful-stop
ExecReload=/opt/apache/bin/apachectl graceful
PrivateTmp=true
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

But every time I try to start httpd using the systemctl command, it
hangs for about 2 minutes then dies.

When I run /opt/apache/bin/httpd -S I get

VirtualHost configuration:
ServerRoot: "/opt/apache"
Main DocumentRoot: "/opt/apache/htdocs"
Main ErrorLog: "/opt/apache/var/logs/error_log"
Mutex default: dir="/opt/apache/var/logs/" mechanism=default
PidFile: "/opt/apache/var/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="daemon" id=2 not_used
Group: name="daemon" id=2 not_used

What am I doing wrong? I want the pid file to go in /opt/apache/var/run
not /opt/apache/var/logs. I am sure there's a configure argument I'm
doing wrong, but I can't find what it is.

Thanks!
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message